diff options
author | David Robillard <d@drobilla.net> | 2007-05-10 00:41:04 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-05-10 00:41:04 +0000 |
commit | 1e7bcd8b0fd451117e241bf49660684314b5757f (patch) | |
tree | 1db61b5cfe032942833890b93b6cd0167bca5c7c /libs/ardour/io.cc | |
parent | 185be4e841e182bbe7cb7820f9cb6371ebebe15d (diff) |
Gain performance improvements (don't waste time applying gain when not necessary).
git-svn-id: svn://localhost/ardour2/branches/midi@1811 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/io.cc')
-rw-r--r-- | libs/ardour/io.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index 67f365a400..b3dc2a89c9 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -249,7 +249,8 @@ IO::deliver_output (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, } - Amp::run(bufs, nframes, _gain, dg, _phase_invert); + if (dg != _gain || dg != 1.0) + Amp::run(bufs, nframes, _gain, dg, _phase_invert); } // Use the panner to distribute audio to output port buffers |