123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- #pragma once
- #include "openmpt/all/BuildSettings.hpp"
- OPENMPT_NAMESPACE_BEGIN
- #ifndef NO_DSP
- #define SURROUNDBUFFERSIZE 2048 // 50ms @ 48kHz
- class CSurroundSettings
- {
- public:
- uint32 m_nProLogicDepth;
- uint32 m_nProLogicDelay;
- public:
- CSurroundSettings();
- };
- class CMegaBassSettings
- {
- public:
- uint32 m_nXBassDepth;
- uint32 m_nXBassRange;
- public:
- CMegaBassSettings();
- };
- struct BitCrushSettings
- {
- int m_Bits;
- BitCrushSettings();
- };
- class CSurround
- {
- public:
- CSurroundSettings m_Settings;
-
- int32 nSurroundSize;
- int32 nSurroundPos;
- int32 nDolbyDepth;
-
- int32 nDolbyHP_Y1;
- int32 nDolbyHP_X1;
- int32 nDolbyLP_Y1;
- int32 nDolbyHP_B0;
- int32 nDolbyHP_B1;
- int32 nDolbyHP_A1;
- int32 nDolbyLP_B0;
- int32 nDolbyLP_B1;
- int32 nDolbyLP_A1;
- int32 SurroundBuffer[SURROUNDBUFFERSIZE];
- public:
- CSurround();
- public:
- void SetSettings(const CSurroundSettings &settings) { m_Settings = settings; }
-
- bool SetXBassParameters(uint32 nDepth, uint32 nRange);
-
- void SetSurroundParameters(uint32 nDepth, uint32 nDelay);
- void Initialize(bool bReset, DWORD MixingFreq);
- void Process(int * MixSoundBuffer, int * MixRearBuffer, int count, uint32 nChannels);
- private:
- void ProcessStereoSurround(int * MixSoundBuffer, int count);
- void ProcessQuadSurround(int * MixSoundBuffer, int * MixRearBuffer, int count);
- };
- class CMegaBass
- {
- public:
- CMegaBassSettings m_Settings;
-
- int32 nXBassFlt_Y1;
- int32 nXBassFlt_X1;
- int32 nXBassFlt_B0;
- int32 nXBassFlt_B1;
- int32 nXBassFlt_A1;
-
- int32 nDCRFlt_Y1lf;
- int32 nDCRFlt_X1lf;
- int32 nDCRFlt_Y1rf;
- int32 nDCRFlt_X1rf;
- int32 nDCRFlt_Y1lb;
- int32 nDCRFlt_X1lb;
- int32 nDCRFlt_Y1rb;
- int32 nDCRFlt_X1rb;
- public:
- CMegaBass();
- public:
- void SetSettings(const CMegaBassSettings &settings) { m_Settings = settings; }
-
- void SetXBassParameters(uint32 nDepth, uint32 nRange);
- void Initialize(bool bReset, DWORD MixingFreq);
- void Process(int * MixSoundBuffer, int * MixRearBuffer, int count, uint32 nChannels);
- };
- class BitCrush
- {
- public:
- BitCrushSettings m_Settings;
- public:
- BitCrush();
- public:
- void SetSettings(const BitCrushSettings &settings) { m_Settings = settings; }
- void Initialize(bool bReset, DWORD MixingFreq);
- void Process(int * MixSoundBuffer, int * MixRearBuffer, int count, uint32 nChannels);
- };
- #endif // NO_DSP
- OPENMPT_NAMESPACE_END
|