rewrote code for monophonic behaviour (calculation of position at which to resume states etc.)

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@524 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2007-08-18 21:14:56 +00:00
parent 30bdca17c0
commit e05ce274fb
4 changed files with 144 additions and 81 deletions

View File

@@ -597,7 +597,7 @@ void instrumentTrack::processAudioBuffer( sampleFrame * _buf,
volumeVector v = m_surroundArea->getVolumeVector( v_scale );
engine::getMixer()->bufferToPort( _buf,
( _n != NULL ) ? _n->framesLeftForCurrentPeriod() : _frames,
( _n != NULL ) ? tMin<f_cnt_t>( _n->framesLeftForCurrentPeriod(), _frames ) : _frames,
( _n != NULL ) ? _n->offset() : 0, v, m_audioPort );
}
@@ -799,10 +799,10 @@ void instrumentTrack::playNote( notePlayHandle * _n, bool _try_parallelizing )
// in last period and have
// to clear parts of it
_n->noteOff();
/* engine::getMixer()->clearAudioBuffer( m_audioPort->firstBuffer(),
engine::getMixer()->clearAudioBuffer( m_audioPort->firstBuffer(),
engine::getMixer()->framesPerPeriod() -
( *youngest_note )->offset(),
( *youngest_note )->offset() );*/
( *youngest_note )->offset() );
return;
}
}