Make sure sio_write and sio_read return valid values
[openal-soft.git] / utils / sofa-support.h
blob1229f49dc3d8704b12c42bf45ea5589195668e0a
1 #ifndef UTILS_SOFA_SUPPORT_H
2 #define UTILS_SOFA_SUPPORT_H
4 #include <cstddef>
5 #include <memory>
6 #include <vector>
8 #include "mysofa.h"
11 struct MySofaDeleter {
12 void operator()(MYSOFA_HRTF *sofa) { mysofa_free(sofa); }
14 using MySofaHrtfPtr = std::unique_ptr<MYSOFA_HRTF,MySofaDeleter>;
16 // Per-field measurement info.
17 struct SofaField {
18 using uint = unsigned int;
20 double mDistance{0.0};
21 uint mEvCount{0u};
22 uint mEvStart{0u};
23 std::vector<uint> mAzCounts;
26 const char *SofaErrorStr(int err);
28 std::vector<SofaField> GetCompatibleLayout(const size_t m, const float *xyzs);
30 #endif /* UTILS_SOFA_SUPPORT_H */