🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
634 B

  1. #ifndef UTILS_SOFA_SUPPORT_H
  2. #define UTILS_SOFA_SUPPORT_H
  3. #include <cstddef>
  4. #include <memory>
  5. #include <vector>
  6. #include "mysofa.h"
  7. struct MySofaDeleter {
  8. void operator()(MYSOFA_HRTF *sofa) { mysofa_free(sofa); }
  9. };
  10. using MySofaHrtfPtr = std::unique_ptr<MYSOFA_HRTF,MySofaDeleter>;
  11. // Per-field measurement info.
  12. struct SofaField {
  13. using uint = unsigned int;
  14. double mDistance{0.0};
  15. uint mEvCount{0u};
  16. uint mEvStart{0u};
  17. std::vector<uint> mAzCounts;
  18. };
  19. const char *SofaErrorStr(int err);
  20. std::vector<SofaField> GetCompatibleLayout(const size_t m, const float *xyzs);
  21. #endif /* UTILS_SOFA_SUPPORT_H */