Restore the FX channel lock to its former glory
In the course of 32b7e04, I removed the channel lock from FxChannel because
I was under the impression that it was only needed to prevent crashes on
channel delete. However, at least two people experience crackling audio
after it was removed (#2708). Therefore, this commit reinstates it.
This commit is contained in:
@@ -68,6 +68,7 @@ FxChannel::FxChannel( int idx, Model * _parent ) :
|
||||
m_soloModel( false, _parent ),
|
||||
m_volumeModel( 1.0, 0.0, 2.0, 0.001, _parent ),
|
||||
m_name(),
|
||||
m_lock(),
|
||||
m_channelIndex( idx ),
|
||||
m_queued( false ),
|
||||
m_dependenciesMet( 0 )
|
||||
@@ -547,8 +548,10 @@ void FxMixer::mixToChannel( const sampleFrame * _buf, fx_ch_t _ch )
|
||||
{
|
||||
if( m_fxChannels[_ch]->m_muteModel.value() == false )
|
||||
{
|
||||
m_fxChannels[_ch]->m_lock.lock();
|
||||
MixHelpers::add( m_fxChannels[_ch]->m_buffer, _buf, Engine::mixer()->framesPerPeriod() );
|
||||
m_fxChannels[_ch]->m_hasInput = true;
|
||||
m_fxChannels[_ch]->m_lock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user