Fix crash when removing last channel
Sometimes the last channel still had processing to do when it got deleted
This commit is contained in:
@@ -529,7 +529,10 @@ FloatModel * FxMixer::channelSendModel( fx_ch_t fromChannel, fx_ch_t toChannel )
|
||||
|
||||
void FxMixer::mixToChannel( const sampleFrame * _buf, fx_ch_t _ch )
|
||||
{
|
||||
if( m_fxChannels[_ch]->m_muteModel.value() == false )
|
||||
// The first check is for the case where the last fxchannel was deleted but
|
||||
// there was a race condition where it had to be processed.
|
||||
if( _ch < m_fxChannels.size() &&
|
||||
m_fxChannels[_ch]->m_muteModel.value() == false )
|
||||
{
|
||||
m_fxChannels[_ch]->m_lock.lock();
|
||||
MixHelpers::add( m_fxChannels[_ch]->m_buffer, _buf, Engine::mixer()->framesPerPeriod() );
|
||||
|
||||
Reference in New Issue
Block a user