mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-13 19:52:12 -04:00
Merge pull request #993 from diizy/master
NPH fix: prevent offsets from going over period limit
This commit is contained in:
@@ -187,6 +187,13 @@ void NotePlayHandle::play( sampleFrame * _working_buffer )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// if the note offset falls over to next period, then don't start playback yet
|
||||
if( offset() >= engine::mixer()->framesPerPeriod() )
|
||||
{
|
||||
setOffset( offset() - engine::mixer()->framesPerPeriod() );
|
||||
return;
|
||||
}
|
||||
|
||||
// number of frames that can be played this period
|
||||
f_cnt_t framesThisPeriod = m_totalFramesPlayed == 0
|
||||
|
||||
Reference in New Issue
Block a user