fixed mixer crash, for realz this time

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1939 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Andrew Kelley
2008-12-16 04:45:49 +00:00
parent 0aec3c0b05
commit 164616d45a

View File

@@ -176,14 +176,16 @@ void instrumentTrack::processAudioBuffer( sampleFrame * _buf,
}
m_audioPort.setNextFxChannel( m_effectChannelModel.value() );
int panning = m_panningModel.value();
if( _n != NULL )
{
panning += _n->getPanning();
}
engine::getMixer()->bufferToPort( _buf, ( _n != NULL ) ? qMin<f_cnt_t>(_n->framesLeftForCurrentPeriod(), _frames ) :
_frames,
( _n != NULL ) ? _n->offset() : 0,
panningToVolumeVector(
(int) m_panningModel.value() +
( _n != NULL ) ? _n->getPanning() : 0,
v_scale ),
&m_audioPort );
panningToVolumeVector( panning, v_scale ), &m_audioPort );
}