From 48a720448779e4519b2cccae7c41ab1a618224a7 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 29 Nov 2020 20:56:37 +0100 Subject: Add SoundFrame::channels(). --- src/sound_frame.cc | 6 ++++++ src/sound_frame.h | 1 + 2 files changed, 7 insertions(+) (limited to 'src') 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 @@ -53,6 +53,12 @@ SoundFrame::get (int channel, int frame) const return d[0] | (d[1] << 8) | (d[2] << 16); } +int +SoundFrame::channels () const +{ + return _channels; +} + int SoundFrame::samples () const { 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 { public: SoundFrame (ASDCP::PCM::MXFReader* reader, int n, boost::shared_ptr c); + int channels () const; int samples () const; int32_t get (int channel, int sample) const; -- cgit v1.2.3