diff options
Diffstat (limited to 'src/audio/pcm.h')
-rw-r--r-- | src/audio/pcm.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/audio/pcm.h b/src/audio/pcm.h index 8df44e8..62052bf 100644 --- a/src/audio/pcm.h +++ b/src/audio/pcm.h @@ -21,6 +21,12 @@ public: ~PCM(); void clear(); + + /// set the data size + void set_size(size_t size); + + /// grow the buffer + void grow(size_t size); /// pointer to the raw pcm data inline unsigned char *data() { @@ -32,7 +38,12 @@ public: return &pcm_data[index]; } - /// size in bytes + /// size of the buffer + inline size_t buff_size() { + return pcm_buff_size; + } + + /// size of the audio data, in bytes inline size_t size() { return pcm_size; } @@ -59,6 +70,7 @@ private: unsigned int pcm_samplerate; unsigned int pcm_bitspersample; size_t pcm_size; + size_t pcm_buff_size; }; } |