blob: 8344f3e7cbc6e14ddb240066d931415b4513676c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
|