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/SABuffer.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Src/Winamp/SABuffer.h (limited to 'Src/Winamp/SABuffer.h') diff --git a/Src/Winamp/SABuffer.h b/Src/Winamp/SABuffer.h new file mode 100644 index 00000000..8344f3e7 --- /dev/null +++ b/Src/Winamp/SABuffer.h @@ -0,0 +1,24 @@ +#ifndef NULLSOFT_WINAMP_SA_BUFFER_H +#define NULLSOFT_WINAMP_SA_BUFFER_H + +#define SABUFFER_WINDOW_INCREMENT 256 + +class SABuffer +{ +public: + SABuffer(); + void WindowToFFTBuffer(float *wavetrum); + unsigned int AddToBuffer(char *samples, int numChannels, int bps, int ts, unsigned int numSamples); + bool Full() { return used == 512; } + void CopyHalf(); + void Clear(); +private: + + float buffer[2][512]; + float window[512]; + size_t used; + bool init; +}; + + +#endif \ No newline at end of file -- cgit