diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/sound_frame.cc | 6 | ||||
| -rw-r--r-- | src/sound_frame.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/sound_frame.cc b/src/sound_frame.cc index 521c990f..b5a52d02 100644 --- a/src/sound_frame.cc +++ b/src/sound_frame.cc @@ -54,6 +54,12 @@ SoundFrame::get (int channel, int frame) const } int +SoundFrame::channels () const +{ + return _channels; +} + +int SoundFrame::samples () const { return size() / (_channels * 3); diff --git a/src/sound_frame.h b/src/sound_frame.h index e58e4bf3..5494d2da 100644 --- a/src/sound_frame.h +++ b/src/sound_frame.h @@ -47,6 +47,7 @@ class SoundFrame : public Frame<ASDCP::PCM::MXFReader, ASDCP::PCM::FrameBuffer> { public: SoundFrame (ASDCP::PCM::MXFReader* reader, int n, boost::shared_ptr<const DecryptionContext> c); + int channels () const; int samples () const; int32_t get (int channel, int sample) const; |
