diff options
author | Chris Robinson <[email protected]> | 2020-11-27 22:27:45 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-11-27 22:27:45 -0800 |
commit | dbfdd35545268bc6f52b3b50365a36777fda1730 (patch) | |
tree | cccaa45c72d71b8d0d50fa637cb536bc1834279b | |
parent | 7e798df7b87dc4ca4821e3b16e337d7106c7e1cf (diff) |
Move some declarations to more appropriate headers
-rw-r--r-- | alc/alcmain.h | 7 | ||||
-rw-r--r-- | alc/alu.h | 13 | ||||
-rw-r--r-- | alc/mixer/defs.h | 20 | ||||
-rw-r--r-- | alc/voice.h | 1 |
4 files changed, 24 insertions, 17 deletions
diff --git a/alc/alcmain.h b/alc/alcmain.h index 41906bde..b95791fb 100644 --- a/alc/alcmain.h +++ b/alc/alcmain.h @@ -29,6 +29,7 @@ #include "hrtf.h" #include "inprogext.h" #include "intrusive_ptr.h" +#include "mixer/defs.h" #include "vector.h" class BFormatDec; @@ -154,12 +155,6 @@ struct BFChannelConfig { ALuint Index; }; -/* Maximum number of samples to pad on the ends of a buffer for resampling. - * Note that the padding is symmetric (half at the beginning and half at the - * end)! - */ -#define MAX_RESAMPLER_PADDING 48 - struct MixParams { /* Coefficient channel mapping for mixing to the buffer. */ @@ -6,13 +6,15 @@ #include <cstddef> #include <type_traits> -#include "AL/al.h" - -#include "alcmain.h" #include "alspan.h" +#include "ambidefs.h" +#include "core/bufferline.h" +#include "core/devformat.h" struct ALCcontext; +struct ALCdevice; struct ALeffectslot; +struct MixParams; #define MAX_PITCH 10 @@ -37,11 +39,6 @@ constexpr float AirAbsorbGainHF{0.99426f}; /* -0.05dB */ constexpr float ReverbDecayGain{0.001f}; /* -60 dB */ -constexpr int MixerFracBits{12}; -constexpr int MixerFracOne{1 << MixerFracBits}; -constexpr int MixerFracMask{MixerFracOne - 1}; - - inline float lerp(float val1, float val2, float mu) noexcept { return val1 + (val2-val1)*mu; } inline float cubic(float val1, float val2, float val3, float val4, float mu) noexcept diff --git a/alc/mixer/defs.h b/alc/mixer/defs.h index bb59b867..e3de6444 100644 --- a/alc/mixer/defs.h +++ b/alc/mixer/defs.h @@ -1,15 +1,29 @@ #ifndef MIXER_DEFS_H #define MIXER_DEFS_H -#include "alcmain.h" +#include <array> + #include "alspan.h" -#include "alu.h" -#include "hrtf.h" +#include "core/bufferline.h" +struct DirectHrtfState; +struct HrtfFilter; union InterpState; struct MixHrtfFilter; using uint = unsigned int; +using float2 = std::array<float,2>; + + +constexpr int MixerFracBits{12}; +constexpr int MixerFracOne{1 << MixerFracBits}; +constexpr int MixerFracMask{MixerFracOne - 1}; + +/* Maximum number of samples to pad on the ends of a buffer for resampling. + * Note that the padding is symmetric (half at the beginning and half at the + * end)! + */ +#define MAX_RESAMPLER_PADDING 48 template<typename TypeTag, typename InstTag> diff --git a/alc/voice.h b/alc/voice.h index 5ae7a945..3f1642f1 100644 --- a/alc/voice.h +++ b/alc/voice.h @@ -12,6 +12,7 @@ #include "filters/nfc.h" #include "filters/splitter.h" #include "hrtf.h" +#include "mixer/defs.h" struct EffectSlot; struct BufferlistItem; |