diff options
author | Stijn Buys <ingar@osirion.org> | 2009-08-18 09:24:15 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2009-08-18 09:24:15 +0000 |
commit | f030154fe727e25a2afe1f78b3998c2d2dba95e4 (patch) | |
tree | cd92baf9e4fa8a136523b9eb570e9811846c9250 /src/audio/pcm.h | |
parent | 5636fad174f0bcff857c357c394c4cc8d424b302 (diff) |
astyle cleanup, corrects not loading of material textures
Diffstat (limited to 'src/audio/pcm.h')
-rw-r--r-- | src/audio/pcm.h | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/src/audio/pcm.h b/src/audio/pcm.h index dc8eb16..8df44e8 100644 --- a/src/audio/pcm.h +++ b/src/audio/pcm.h @@ -9,10 +9,12 @@ #include <string> -namespace audio { +namespace audio +{ /// class to hold PCM audio data -class PCM { +class PCM +{ public: PCM(unsigned int samplerate, unsigned int samplesize, unsigned int channels, size_t size); @@ -21,22 +23,34 @@ public: void clear(); /// pointer to the raw pcm data - inline unsigned char *data() { return pcm_data; } + inline unsigned char *data() { + return pcm_data; + } /// index into the raw pcm data - inline unsigned char *operator[](size_t index) { return &pcm_data[index]; } + inline unsigned char *operator[](size_t index) { + return &pcm_data[index]; + } /// size in bytes - inline size_t size() { return pcm_size; } + inline size_t size() { + return pcm_size; + } /// samplerate in samples per second - inline unsigned int samplerate() const { return pcm_samplerate; } + inline unsigned int samplerate() const { + return pcm_samplerate; + } /// number of bits per sample - inline unsigned int bitspersample() const { return pcm_bitspersample; } + inline unsigned int bitspersample() const { + return pcm_bitspersample; + } /// number of channels - inline unsigned int channels() const { return pcm_channels; } + inline unsigned int channels() const { + return pcm_channels; + } private: unsigned char *pcm_data; |