diff --git a/windows/sound.cpp b/windows/sound.cpp index 101e7f8e..cdf13c91 100755 --- a/windows/sound.cpp +++ b/windows/sound.cpp @@ -337,10 +337,12 @@ int CSound::GetActualBufferSize ( const int iDesiredBufferSizeMono ) } else { - if ( HWBufferInfo.lGranularity <= 0 ) + if ( ( HWBufferInfo.lGranularity < -1 ) || + ( HWBufferInfo.lGranularity == 0 ) ) { // 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 // document. We assume here that all buffer sizes in between // minimum and maximum buffer sizes are allowed.