diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-08-04 15:03:15 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-08-04 15:03:15 +0200 |
commit | 16e1e247638aa0da5541aa78fb141e60744d56a0 (patch) | |
tree | b6f99c16767c95c0b9fb0a79abea613150b11a4e /decoder.h | |
parent | 2c01957dfe1135955627cbbbffddc70d090d2656 (diff) |
Handle sample rates and channels.
Diffstat (limited to 'decoder.h')
-rw-r--r-- | decoder.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -7,6 +7,10 @@ //! Interface for classes outputting raw audio. class RawAudioSource { + protected: + int samplerate; + int channels; + public: typedef boost::shared_ptr<RawAudioSource> p; @@ -15,6 +19,12 @@ class RawAudioSource { //! Read into provided buffer. virtual std::size_t read(char* buf, std::size_t buf_size) = 0; + + //! Return sample rate. + int get_samplerate() { return samplerate; } + + //! Return number of channels. + int get_channels() { return channels; } }; //! Decoder base class. |