in case we have invalid sizes, clear buffer to avoid a constant tone to be played all the time

This commit is contained in:
Volker Fischer 2015-11-17 18:48:07 +00:00
parent 0ac2421e61
commit d5bcb0fc1a

View file

@ -568,10 +568,15 @@ OSStatus CSound::callbackIO ( AudioDeviceID inDevice,
pSound->vecsTmpAudioSndCrdStereo[i] = pSound->vecsTmpAudioSndCrdStereo[i] =
(short) ( pInData[i] * _MAXSHORT ); (short) ( pInData[i] * _MAXSHORT );
} }
// call processing callback function
pSound->ProcessCallback ( pSound->vecsTmpAudioSndCrdStereo );
} }
else
{
// incompatible sizes, clear work buffer
pSound->vecsTmpAudioSndCrdStereo.Reset ( 0 );
}
// call processing callback function
pSound->ProcessCallback ( pSound->vecsTmpAudioSndCrdStereo );
} }
else else
{ {