diff options
author | David Robillard <d@drobilla.net> | 2006-09-01 07:38:55 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-09-01 07:38:55 +0000 |
commit | bd1220a46db9fe909d09c08139cfb61ba98ec9f3 (patch) | |
tree | 5662e862dba8408601c0495e1aa8dabba72c688a /libs/ardour/audio_port.cc | |
parent | 017e16c530bb1a9f186aa81893089dc79b4ddc24 (diff) |
Fixes for IO port adding/removing
Working audio sends/port inserts
Send gain, panning
MIDI sends working (maybe port inserts too?)
Buffer/Port fixes (related to silence)
Metering bug fixes
git-svn-id: svn://localhost/ardour2/branches/midi@883 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/audio_port.cc')
-rw-r--r-- | libs/ardour/audio_port.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/ardour/audio_port.cc b/libs/ardour/audio_port.cc index 99f2b7ecae..2250c7f2a7 100644 --- a/libs/ardour/audio_port.cc +++ b/libs/ardour/audio_port.cc @@ -44,7 +44,7 @@ AudioPort::reset() if (_buffer.capacity() > 0) { _buffer.clear(); } - _silent = true; + assert(_buffer.silent()); } _metering = 0; @@ -55,8 +55,12 @@ void AudioPort::cycle_start (jack_nframes_t nframes) { if (_flags & JackPortIsOutput) { - // FIXME: do nothing, we can cache the value (but capacity needs to be set) + const bool silent = _buffer.silent(); + // FIXME: do nothing, we can cache the value (but capacity needs to be set for MIDI) _buffer.set_data((Sample*)jack_port_get_buffer (_port, nframes), nframes); + if (silent) { + _buffer.silence(nframes); + } } else { _buffer.set_data((Sample*)jack_port_get_buffer (_port, nframes), nframes); } |