prevent buffer pointers from being pushed when nframes=buffers.nframes

in Jack::processFrames()
main
Gerald 2016-09-26 10:38:11 +02:00 committed by Harry van Haaren
parent c084601d0e
commit 86b309b17f
1 changed files with 13 additions and 10 deletions

View File

@ -518,16 +518,19 @@ void Jack::processFrames(int nframes)
// JACK in multiple parts internally in Luppp: used for processing bar() / beat()
// if a full JACK nframes has been processed, this is extra work: its not that expensive
/// update buffers by nframes
buffers.audio[Buffers::MASTER_INPUT] = &buffers.audio[Buffers::MASTER_INPUT] [nframes];
buffers.audio[Buffers::MASTER_RETURN_L] = &buffers.audio[Buffers::MASTER_RETURN_L][nframes];
buffers.audio[Buffers::MASTER_RETURN_R] = &buffers.audio[Buffers::MASTER_RETURN_R][nframes];
buffers.audio[Buffers::HEADPHONES_OUT] = &buffers.audio[Buffers::HEADPHONES_OUT] [nframes];
buffers.audio[Buffers::JACK_SEND_OUT] = &buffers.audio[Buffers::JACK_SEND_OUT][nframes];
buffers.audio[Buffers::JACK_MASTER_OUT_L] = &buffers.audio[Buffers::JACK_MASTER_OUT_L][nframes];
buffers.audio[Buffers::JACK_MASTER_OUT_R] = &buffers.audio[Buffers::JACK_MASTER_OUT_R][nframes];
buffers.audio[Buffers::JACK_SIDECHAIN_KEY] = &buffers.audio[Buffers::JACK_SIDECHAIN_KEY][nframes];
buffers.audio[Buffers::JACK_SIDECHAIN_SIGNAL]=&buffers.audio[Buffers::JACK_SIDECHAIN_SIGNAL][nframes];
if(nframes<buffers.nframes)
{
buffers.audio[Buffers::MASTER_INPUT] = &buffers.audio[Buffers::MASTER_INPUT] [nframes];
buffers.audio[Buffers::MASTER_RETURN_L] = &buffers.audio[Buffers::MASTER_RETURN_L][nframes];
buffers.audio[Buffers::MASTER_RETURN_R] = &buffers.audio[Buffers::MASTER_RETURN_R][nframes];
buffers.audio[Buffers::HEADPHONES_OUT] = &buffers.audio[Buffers::HEADPHONES_OUT] [nframes];
buffers.audio[Buffers::JACK_SEND_OUT] = &buffers.audio[Buffers::JACK_SEND_OUT][nframes];
buffers.audio[Buffers::JACK_MASTER_OUT_L] = &buffers.audio[Buffers::JACK_MASTER_OUT_L][nframes];
buffers.audio[Buffers::JACK_MASTER_OUT_R] = &buffers.audio[Buffers::JACK_MASTER_OUT_R][nframes];
buffers.audio[Buffers::JACK_SIDECHAIN_KEY] = &buffers.audio[Buffers::JACK_SIDECHAIN_KEY][nframes];
buffers.audio[Buffers::JACK_SIDECHAIN_SIGNAL]=&buffers.audio[Buffers::JACK_SIDECHAIN_SIGNAL][nframes];
}
return;
}