
#include <proAudio.h>
Public Member Functions | |
| AudioSample (unsigned char *data, unsigned int size, unsigned short channels, unsigned int sampleRate, unsigned short bitsPerSample) | |
| AudioSample (const AudioSample &source) | |
| ~AudioSample () | |
| unsigned char * | data () |
| const unsigned char * | data () const |
| unsigned int | size () const |
| unsigned int | frames () const |
| unsigned int | sizeFrame () const |
| unsigned short | channels () const |
| unsigned int | sampleRate () const |
| unsigned short | bitsPerSample () const |
| bool | bitsPerSample (unsigned short bits) |
| unsigned short | bytesPerSample () const |
| void | volume (float f) |
Static Public Member Functions | |
| static AudioSample * | loadWav (const std::string &fname) |
| static AudioSample * | readWav (FILE *stream, size_t(*readFunc)(void *, size_t, size_t, FILE *)) |
Protected Attributes | |
| unsigned char * | m_data |
| unsigned int | m_size |
| unsigned short | m_channels |
| unsigned int | m_sampleRate |
| unsigned short | m_bitsPerSample |
|
||||||||||||||||||||||||
|
constructor from memory data
|
|
|
copy constructor
|
|
|
destructor
|
|
|
converts to a different bit rate, e.g., 8, 16
|
|
|
returns number of bits per mono sample, e.g., 8, 16
|
|
|
returns number of bytes per sample, e.g., 1, 2
|
|
|
returns number of parallel channels, 1 mono, 2 stereo
|
|
|
allows reading sample data
|
|
|
allows accessing sample data
|
|
|
returns sample size in number of frames
|
|
|
loads a WAV file
|
|
||||||||||||
|
reads WAV data from a stream via a function compatible to std::fread
|
|
|
returns number of frames per second, e.g., 44100, 22050
|
|
|
returns sample size in bytes
|
|
|
returns size of a single frame in bytes
|
|
|
changes volume by given factor
|
|
|
number of bits per sample, e.g., 8, 16
|
|
|
number of parallel channels, 1 mono, 2 stereo
|
|
|
stores sample data
|
|
|
number of samples per second, e.g., 44100, 22050
|
|
|
sample size in bytes
|
| © 2009-02-04 by Gerald Franz, www.viremo.de | impressum |