Currently only supports PCM wave format.
|
| GWave () |
|
| ~GWave () |
|
unsigned int | bitsPerSample () |
| Returns the number of bits-per-sample. More...
|
|
unsigned short | channels () |
| Returns the number of channels. More...
|
|
unsigned char * | data () |
| Returns a pointer to the raw sample bytes. More...
|
|
void | load (const char *szFilename) |
| Loads from a file in WAV format. More...
|
|
unsigned int | sampleCount () |
| Returns the number of samples. More...
|
|
unsigned int | sampleRate () |
| Returns the sample rate. More...
|
|
void | save (const char *szFilename) |
| Saves to a file in WAV format. More...
|
|
void | setData (unsigned char *pData, int bitsPerSample, int sampleCount, int channels, int sampleRate) |
| pData is a pointer to a buffer of raw data. bitsPerSample should be 8, 16, or 32. If it is 8, sample values are unsigned (0-255). If it is 16 or 32, sample values are signed. channels is typically 1 or 2, but it can be larger. sampleRate is typically one of 8000, 16000, 22050, 44100, 48000, or 96000, but other sample rates could be used as well. More...
|
|
void GClasses::GWave::setData |
( |
unsigned char * |
pData, |
|
|
int |
bitsPerSample, |
|
|
int |
sampleCount, |
|
|
int |
channels, |
|
|
int |
sampleRate |
|
) |
| |
pData is a pointer to a buffer of raw data. bitsPerSample should be 8, 16, or 32. If it is 8, sample values are unsigned (0-255). If it is 16 or 32, sample values are signed. channels is typically 1 or 2, but it can be larger. sampleRate is typically one of 8000, 16000, 22050, 44100, 48000, or 96000, but other sample rates could be used as well.