alu.h 786 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef ALU_H
  2. #define ALU_H
  3. #include <bitset>
  4. #include <cstdint>
  5. #include <optional>
  6. struct ALCcontext;
  7. struct ALCdevice;
  8. struct EffectSlot;
  9. enum class StereoEncoding : std::uint8_t;
  10. namespace al {
  11. struct Device;
  12. } // namespace al
  13. constexpr float GainMixMax{1000.0f}; /* +60dB */
  14. enum CompatFlags : std::uint8_t {
  15. ReverseX,
  16. ReverseY,
  17. ReverseZ,
  18. Count
  19. };
  20. using CompatFlagBitset = std::bitset<CompatFlags::Count>;
  21. void aluInit(CompatFlagBitset flags, const float nfcscale);
  22. /* aluInitRenderer
  23. *
  24. * Set up the appropriate panning method and mixing method given the device
  25. * properties.
  26. */
  27. void aluInitRenderer(al::Device *device, int hrtf_id, std::optional<StereoEncoding> stereomode);
  28. void aluInitEffectPanning(EffectSlot *slot, ALCcontext *context);
  29. #endif