1
0

Resampler.h 626 B

1234567891011121314151617181920212223
  1. #ifndef NULLSOFT_WINAMP_RESAMPLER_H
  2. #define NULLSOFT_WINAMP_RESAMPLER_H
  3. #include <mmreg.h>
  4. #include <msacm.h>
  5. class Resampler
  6. {
  7. public:
  8. Resampler(size_t inputBits, size_t inputChannels, size_t inputSampleRate,
  9. size_t outputBits, size_t outputChannels, size_t outputSampleRate, bool floatingPoint);
  10. ~Resampler();
  11. size_t Convert(void *input, size_t *inputBytes, void *output, size_t outputBytes);
  12. bool OK();
  13. void Flush();
  14. double sizeFactor;
  15. private:
  16. size_t UseInternalBuffer(void *output, size_t outputBytes);
  17. HACMSTREAM hStream;
  18. __int8 *buffer;
  19. size_t bufferAlloc;
  20. size_t bufferValid;
  21. bool eof;
  22. };
  23. #endif