Proposed fix for 1522 Noise at the end of Sample previews

This commit is contained in:
Dave French
2015-01-05 21:41:48 +00:00
parent e5c4df372e
commit 3c44012def

View File

@@ -98,14 +98,15 @@ SamplePlayHandle::~SamplePlayHandle()
void SamplePlayHandle::play( sampleFrame * buffer )
{
const fpp_t fpp = Engine::mixer()->framesPerPeriod();
//play( 0, _try_parallelizing );
if( framesDone() >= totalFrames() )
{
memset( buffer, 0, sizeof( sampleFrame ) * fpp );
return;
}
sampleFrame * workingBuffer = buffer;
const fpp_t fpp = Engine::mixer()->framesPerPeriod();
f_cnt_t frames = fpp;
// apply offset for the first period