diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-06-10 18:10:07 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-06-10 18:10:07 +0000 |
commit | 6e9b9294e1e7a22f31eabbafa39cee5844b3449a (patch) | |
tree | 67285ddc9b3cb0fa656ed711cc7d78cff35075d9 /libs/ardour/amp.cc | |
parent | ff26317d4f7904c071d7ecfb96fd84e71728f6d0 (diff) |
nick m's fix for markers etc ; several tweaks for mute/solo ; rename run_in_place() as run()
git-svn-id: svn://localhost/ardour2/branches/3.0@5155 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/amp.cc')
-rw-r--r-- | libs/ardour/amp.cc | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/libs/ardour/amp.cc b/libs/ardour/amp.cc index 755dc8b821..154d909560 100644 --- a/libs/ardour/amp.cc +++ b/libs/ardour/amp.cc @@ -16,6 +16,7 @@ 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <iostream> #include <cstring> #include <cmath> #include <algorithm> @@ -64,7 +65,7 @@ Amp::configure_io (ChanCount in, ChanCount out) } void -Amp::run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes) +Amp::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes) { gain_t mute_gain; @@ -137,25 +138,15 @@ Amp::run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, Amp::apply_gain (bufs, nframes, _current_gain, dg); _current_gain = dg; - } else if ((_current_gain != 0.0f) && (_current_gain != 1.0f)) { + } else if (_current_gain != 1.0f) { - /* gain has not changed, but its non-unity, so apply it unless - its zero. + /* gain has not changed, but its non-unity */ for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) { - Sample* const sp = i->data(); - apply_gain_to_buffer(sp, nframes, _current_gain); + apply_gain_to_buffer (i->data(), nframes, _current_gain); } - - } else if (_current_gain == 0.0f) { - - /* silence! */ - - for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) { - i->clear(); - } - } + } } } } |