From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- Src/Winamp/Resampler.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Src/Winamp/Resampler.h (limited to 'Src/Winamp/Resampler.h') diff --git a/Src/Winamp/Resampler.h b/Src/Winamp/Resampler.h new file mode 100644 index 00000000..2d293b84 --- /dev/null +++ b/Src/Winamp/Resampler.h @@ -0,0 +1,23 @@ +#ifndef NULLSOFT_WINAMP_RESAMPLER_H +#define NULLSOFT_WINAMP_RESAMPLER_H +#include +#include +class Resampler +{ +public: + Resampler(size_t inputBits, size_t inputChannels, size_t inputSampleRate, + size_t outputBits, size_t outputChannels, size_t outputSampleRate, bool floatingPoint); + ~Resampler(); + size_t Convert(void *input, size_t *inputBytes, void *output, size_t outputBytes); + bool OK(); + void Flush(); + double sizeFactor; +private: + size_t UseInternalBuffer(void *output, size_t outputBytes); + HACMSTREAM hStream; + __int8 *buffer; + size_t bufferAlloc; + size_t bufferValid; + bool eof; +}; +#endif \ No newline at end of file -- cgit