diff options
author | David Robillard <d@drobilla.net> | 2007-05-10 03:50:17 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-05-10 03:50:17 +0000 |
commit | 9a4a9cbb63958484553ed981822ca97ceb1dc4f5 (patch) | |
tree | 6888079450c5ba74d195732fafc99de8d8531c36 /libs/ardour/panner.cc | |
parent | 2a52135c663e9a60b5f0cc9cc6673799c3ea5549 (diff) |
Added nicer looking wrapper methods for ChanCount::get(DataType), sedified code to use it.
git-svn-id: svn://localhost/ardour2/trunk@1816 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/panner.cc')
-rw-r--r-- | libs/ardour/panner.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libs/ardour/panner.cc b/libs/ardour/panner.cc index 2690ac868d..a56f1d0392 100644 --- a/libs/ardour/panner.cc +++ b/libs/ardour/panner.cc @@ -271,7 +271,7 @@ BaseStereoPanner::load (istream& in, string path, uint32_t& linecnt) void BaseStereoPanner::distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes) { - assert(obufs.count().get(DataType::AUDIO) == 2); + assert(obufs.count().n_audio() == 2); pan_t delta; Sample* dst; @@ -430,7 +430,7 @@ EqualPowerStereoPanner::distribute_automated (AudioBuffer& srcbuf, BufferSet& ob nframes_t start, nframes_t end, nframes_t nframes, pan_t** buffers) { - assert(obufs.count().get(DataType::AUDIO) == 2); + assert(obufs.count().n_audio() == 2); Sample* dst; pan_t* pbuf; @@ -1335,9 +1335,9 @@ Panner::set_position (float xpos, float ypos, float zpos, StreamPanner& orig) void Panner::distribute_no_automation (BufferSet& inbufs, BufferSet& outbufs, nframes_t nframes, nframes_t offset, gain_t gain_coeff) { - if (outbufs.count().get(DataType::AUDIO) == 0) { + if (outbufs.count().n_audio() == 0) { // Don't want to lose audio... - assert(inbufs.count().get(DataType::AUDIO) == 0); + assert(inbufs.count().n_audio() == 0); return; } @@ -1346,7 +1346,7 @@ Panner::distribute_no_automation (BufferSet& inbufs, BufferSet& outbufs, nframes assert(!empty()); - if (outbufs.count().get(DataType::AUDIO) == 1) { + if (outbufs.count().n_audio() == 1) { AudioBuffer& dst = outbufs.get_audio(0); @@ -1402,9 +1402,9 @@ Panner::distribute_no_automation (BufferSet& inbufs, BufferSet& outbufs, nframes void Panner::distribute (BufferSet& inbufs, BufferSet& outbufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset) { - if (outbufs.count().get(DataType::AUDIO) == 0) { + if (outbufs.count().n_audio() == 0) { // Failing to deliver audio we were asked to deliver is a bug - assert(inbufs.count().get(DataType::AUDIO) == 0); + assert(inbufs.count().n_audio() == 0); return; } @@ -1428,7 +1428,7 @@ Panner::distribute (BufferSet& inbufs, BufferSet& outbufs, nframes_t start_frame // Otherwise.. let the automation flow, baby - if (outbufs.count().get(DataType::AUDIO) == 1) { + if (outbufs.count().n_audio() == 1) { AudioBuffer& dst = outbufs.get_audio(0); @@ -1447,7 +1447,7 @@ Panner::distribute (BufferSet& inbufs, BufferSet& outbufs, nframes_t start_frame } // More than 1 output, we should have 1 panner for each input - assert(size() == inbufs.count().get(DataType::AUDIO)); + assert(size() == inbufs.count().n_audio()); /* the terrible silence ... */ for (BufferSet::audio_iterator i = outbufs.audio_begin(); i != outbufs.audio_end(); ++i) { |