in case we have invalid sizes, clear buffer to avoid a constant tone to be played all the time
This commit is contained in:
parent
0ac2421e61
commit
d5bcb0fc1a
1 changed files with 8 additions and 3 deletions
|
@ -568,10 +568,15 @@ OSStatus CSound::callbackIO ( AudioDeviceID inDevice,
|
|||
pSound->vecsTmpAudioSndCrdStereo[i] =
|
||||
(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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue