1
0

AGC.h 716 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * AGC.h
  3. * -----
  4. * Purpose: Automatic Gain Control
  5. * Notes : Ugh... This should really be removed at some point.
  6. * Authors: Olivier Lapicque
  7. * OpenMPT Devs
  8. * The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
  9. */
  10. #pragma once
  11. #include "openmpt/all/BuildSettings.hpp"
  12. OPENMPT_NAMESPACE_BEGIN
  13. #ifndef NO_AGC
  14. class CAGC
  15. {
  16. private:
  17. UINT m_nAGC;
  18. std::size_t m_nAGCRecoverCount;
  19. UINT m_Timeout;
  20. public:
  21. CAGC();
  22. void Initialize(bool bReset, DWORD MixingFreq);
  23. public:
  24. void Process(int *MixSoundBuffer, int *RearSoundBuffer, std::size_t count, std::size_t nChannels);
  25. void Adjust(UINT oldVol, UINT newVol);
  26. };
  27. #endif // NO_AGC
  28. OPENMPT_NAMESPACE_END