24 typedef uint8_t SampleType;
26 const SampleType SAMPLE_TYPE_NONE = 0;
28 const SampleType SAMPLE_TYPE_FILE = 1;
30 const SampleType SAMPLE_TYPE_MEM = 2;
37 AudioSample (
const uint8_t *source, uint32_t length, uint16_t channels, uint32_t sr, uint16_t bps);
41 void SetDataPosition (uint32_t newPosition);
42 uint32_t GetDataPosition (
void)
const;
43 uint32_t GetDataLength (
void)
const;
44 int GetData (
int frameCount, uint8_t *buffer);
45 void ClearSample (
void);
46 bool FillSilence (uint32_t time);
53 bool LoadFile (
const char *fileName);
54 void CloseFile (
void);
55 const char* GetFilePath (
void)
const {
return filePath; }
58 SampleType GetType (
void)
const {
return type; }
59 void SetType (SampleType val) { type = val; }
60 uint16_t GetNumChannels (
void)
const {
return numChannels; }
61 void SetNumChannels (uint16_t val) { numChannels = val; }
62 uint32_t GetSampleRate (
void)
const {
return sampleRate; }
63 void SetSampleRate (uint32_t val) { sampleRate = val; byteRate = blockAlign * sampleRate; }
64 uint32_t GetByteRate (
void)
const {
return byteRate; }
65 uint16_t GetBlockAlign (
void)
const {
return blockAlign; }
66 void SetBlockAlign (uint16_t val) { blockAlign = val; byteRate = blockAlign * sampleRate; }
67 uint16_t GetBitsPerSample (
void)
const {
return bitsPerSample; }
68 void SetBitsPerSample (uint16_t val) { bitsPerSample = val; }
69 uint32_t GetNumFrames (
void)
const {
return numFrames; }
74 void PrintWaveInfo (
void);
84 uint16_t bitsPerSample;
Data: Raw audio data.
Definition: player_interfaces.h:1463
Definition: audio_sample.h:32