This commit is contained in:
Volker Fischer 2010-03-03 18:59:22 +00:00
parent e1b949e318
commit 6869f026bc

View file

@ -337,10 +337,12 @@ int CSound::GetActualBufferSize ( const int iDesiredBufferSizeMono )
} }
else else
{ {
if ( HWBufferInfo.lGranularity <= 0 ) if ( ( HWBufferInfo.lGranularity < -1 ) ||
( HWBufferInfo.lGranularity == 0 ) )
{ {
// Special case (seen for EMU audio cards): granularity is // Special case (seen for EMU audio cards): granularity is
// zero or less than zero. // zero or less than zero (make sure to exclude the special
// case of -1).
// There is no definition of this case in the ASIO SDK // There is no definition of this case in the ASIO SDK
// document. We assume here that all buffer sizes in between // document. We assume here that all buffer sizes in between
// minimum and maximum buffer sizes are allowed. // minimum and maximum buffer sizes are allowed.