Fix mixer sends rendering in the backend
Fixed: Buffers was cleared too early resulting in some combinations of sends not working.
This commit is contained in:
@@ -215,8 +215,6 @@ void FxMixer::processChannel( fx_ch_t _ch, sampleFrame * _buf )
|
||||
_buf[f][0] += ch_buf[f][0] * v * amt;
|
||||
_buf[f][1] += ch_buf[f][1] * v * amt;
|
||||
}
|
||||
engine::getMixer()->clearAudioBuffer( ch_buf,
|
||||
engine::getMixer()->framesPerPeriod() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -503,6 +503,8 @@ sampleFrameA * mixer::renderNextBuffer()
|
||||
MicroTimer timer;
|
||||
static song::playPos last_metro_pos = -1;
|
||||
|
||||
FxMixer * fxm = engine::fxMixer();
|
||||
|
||||
song::playPos p = engine::getSong()->getPlayPos(
|
||||
song::Mode_PlayPattern );
|
||||
if( engine::getSong()->playMode() == song::Mode_PlayPattern &&
|
||||
@@ -556,7 +558,7 @@ sampleFrameA * mixer::renderNextBuffer()
|
||||
clearAudioBuffer( m_writeBuf, m_framesPerPeriod );
|
||||
|
||||
// prepare master mix (clear internal buffers etc.)
|
||||
engine::fxMixer()->prepareMasterMix();
|
||||
fxm->prepareMasterMix();
|
||||
|
||||
// create play-handles for new notes, samples etc.
|
||||
engine::getSong()->processNextBuffer();
|
||||
@@ -606,10 +608,17 @@ sampleFrameA * mixer::renderNextBuffer()
|
||||
|
||||
|
||||
// STAGE 4: do master mix in FX mixer
|
||||
engine::fxMixer()->masterMix( m_writeBuf );
|
||||
fxm->masterMix( m_writeBuf );
|
||||
|
||||
WAIT_FOR_JOBS();
|
||||
|
||||
// clear all channel buffers
|
||||
for( int i = 0; i < fxm->numChannels(); ++i)
|
||||
{
|
||||
engine::getMixer()->clearAudioBuffer( fxm->effectChannel(i)->m_buffer,
|
||||
engine::getMixer()->framesPerPeriod() );
|
||||
}
|
||||
|
||||
unlock();
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user