summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Schweer <ws.seh.de>2006-11-01 21:39:13 +0000
committerWerner Schweer <ws.seh.de>2006-11-01 21:39:13 +0000
commit16ffdc43b5101899e8cf3ce343187a8754f58178 (patch)
tree32bb29e5847e8213779b1c883723eb1622807a7e
parent49d2fcd9d8ed4f59cb30c87923cdfa202c2d4370 (diff)
zero audio output buffers in "off" mode
-rw-r--r--muse/muse/audiooutput.cpp7
-rw-r--r--muse/muse/audiotrack.cpp6
2 files changed, 7 insertions, 6 deletions
diff --git a/muse/muse/audiooutput.cpp b/muse/muse/audiooutput.cpp
index dbf61af9..26af8fd8 100644
--- a/muse/muse/audiooutput.cpp
+++ b/muse/muse/audiooutput.cpp
@@ -150,7 +150,7 @@ void AudioOutput::stopRecording(const Pos& /*s*/, const Pos& /*e*/)
//---------------------------------------------------------
// process
-// synthesize "n" frames at buffer offset "offset"
+// synthesize segmentSize frames at buffer offset "offset"
// current frame position is "pos"
//---------------------------------------------------------
@@ -161,6 +161,11 @@ void AudioOutput::process()
AudioTrack::process();
+ if (bufferEmpty) {
+ for (int c = 0; c < channels(); ++c)
+ memset(buffer[c], 0, sizeof(float) * segmentSize);
+ }
+
int n = segmentSize;
if (audio->isRecording() && recordFlag() && _recFile) {
// bounce to file
diff --git a/muse/muse/audiotrack.cpp b/muse/muse/audiotrack.cpp
index 62fde5ca..1639a19a 100644
--- a/muse/muse/audiotrack.cpp
+++ b/muse/muse/audiotrack.cpp
@@ -574,12 +574,8 @@ void AudioTrack::collectInputData()
for (iRoute ir = rl->begin(); ir != rl->end(); ++ir) {
float** ptr;
int ch;
- if (ir->type == Route::TRACK /*|| ir->type == Route::SYNTIPORT*/) {
+ if (ir->type == Route::TRACK) {
AudioTrack* track = (AudioTrack*)ir->track;
-//printf("collectInputData <%s><%s> channel %d off %d\n",
-// track->name().toLatin1().data(),
-// name().toLatin1().data(),
-// track->channels(), track->off());
if (track->off() || song->bounceTrack == track)
continue;
ptr = track->buffer;