diff options
author | David Robillard <d@drobilla.net> | 2006-08-13 03:40:04 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-08-13 03:40:04 +0000 |
commit | 0b572cdd84151335594965a3f0ed16f1665dfa56 (patch) | |
tree | 25818906a95bd0c47c190793d7924b75b5076fde /libs/ardour/panner.cc | |
parent | a98a67120eea8ebb817eebea048affc182ea054e (diff) |
More signal path cleanup, IO now has one deliver_output function that should do the reasonable thing in all cases.
Including deliver MIDI.
You can now create a MIDI Track, run some MIDI through it, and toggle the mute button on and off, hearing either
silence or a large amount of stuck notes depending on your luck. Woooo.
git-svn-id: svn://localhost/ardour2/branches/midi@818 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/panner.cc')
-rw-r--r-- | libs/ardour/panner.cc | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/libs/ardour/panner.cc b/libs/ardour/panner.cc index 0d15ba84e7..3e8329cc9d 100644 --- a/libs/ardour/panner.cc +++ b/libs/ardour/panner.cc @@ -1489,7 +1489,7 @@ Panner::set_position (float xpos, float ypos, float zpos, StreamPanner& orig) } void -Panner::distribute (BufferSet& inbufs, BufferSet& outbufs, jack_nframes_t nframes, jack_nframes_t offset, gain_t gain_coeff) +Panner::distribute_no_automation (BufferSet& inbufs, BufferSet& outbufs, jack_nframes_t nframes, jack_nframes_t offset, gain_t gain_coeff) { if (outbufs.count().get(DataType::AUDIO) == 0) { // Don't want to lose audio... @@ -1561,10 +1561,10 @@ Panner::distribute (BufferSet& inbufs, BufferSet& outbufs, jack_nframes_t nframe } void -Panner::distribute_automated (BufferSet& inbufs, BufferSet& outbufs, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t nframes, jack_nframes_t offset) +Panner::distribute (BufferSet& inbufs, BufferSet& outbufs, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t nframes, jack_nframes_t offset) { if (outbufs.count().get(DataType::AUDIO) == 0) { - // Don't want to lose audio... + // Failing to deliver audio we were asked to deliver is a bug assert(inbufs.count().get(DataType::AUDIO) == 0); return; } @@ -1573,7 +1573,22 @@ Panner::distribute_automated (BufferSet& inbufs, BufferSet& outbufs, jack_nframe assert(!bypassed()); assert(!empty()); + // If we shouldn't play automation defer to distribute_no_automation + if ( !( automation_state() & Play || + ((automation_state() & Touch) && !touching()) ) ) { + + // Speed quietning + gain_t gain_coeff = 1.0; + if (fabsf(_session.transport_speed()) > 1.5f) { + gain_coeff = speed_quietning; + } + distribute_no_automation(inbufs, outbufs, nframes, offset, gain_coeff); + return; + } + + // Otherwise.. let the automation flow, baby + if (outbufs.count().get(DataType::AUDIO) == 1) { AudioBuffer& dst = outbufs.get_audio(0); |