summaryrefslogtreecommitdiff
path: root/libs/ardour/audio_track.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/audio_track.cc')
-rw-r--r--libs/ardour/audio_track.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc
index 920367ae94..7f411be413 100644
--- a/libs/ardour/audio_track.cc
+++ b/libs/ardour/audio_track.cc
@@ -37,6 +37,7 @@
#include <ardour/playlist_factory.h>
#include <ardour/panner.h>
#include <ardour/utils.h>
+#include <ardour/mix.h>
#include "i18n.h"
@@ -740,7 +741,7 @@ AudioTrack::silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end
}
int
-AudioTrack::export_stuff (vector<Sample*>& buffers, uint32_t nbufs, nframes_t start, nframes_t nframes)
+AudioTrack::export_stuff (vector<Sample*>& buffers, uint32_t nbufs, nframes_t start, nframes_t nframes, bool enable_processing)
{
gain_t gain_automation[nframes];
gain_t gain_buffer[nframes];
@@ -778,6 +779,9 @@ AudioTrack::export_stuff (vector<Sample*>& buffers, uint32_t nbufs, nframes_t st
}
}
+ // If no processing is required, there's no need to go any further.
+ if (!enable_processing)
+ return 0;
/* note: only run inserts during export. other layers in the machinery
will already have checked that there are no external port inserts.
@@ -812,10 +816,7 @@ AudioTrack::export_stuff (vector<Sample*>& buffers, uint32_t nbufs, nframes_t st
} else {
for (bi = buffers.begin(); bi != buffers.end(); ++bi) {
- Sample *b = *bi;
- for (nframes_t n = 0; n < nframes; ++n) {
- b[n] *= this_gain;
- }
+ apply_gain_to_buffer(*bi, nframes, this_gain);
}
}
@@ -849,10 +850,10 @@ AudioTrack::bounce (InterThreadInfo& itt)
boost::shared_ptr<Region>
-AudioTrack::bounce_range (nframes_t start, nframes_t end, InterThreadInfo& itt)
+AudioTrack::bounce_range (nframes_t start, nframes_t end, InterThreadInfo& itt, bool enable_processing)
{
vector<boost::shared_ptr<AudioSource> > srcs;
- return _session.write_one_audio_track (*this, start, end, false, srcs, itt);
+ return _session.write_one_audio_track (*this, start, end, false, srcs, itt, enable_processing);
}
void