mirror of
https://github.com/WinampDesktop/winamp.git
synced 2024-11-28 07:50:52 +01:00
24 lines
454 B
C
24 lines
454 B
C
|
#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
|