From 6869f026bc1cae8840d36c23ccc9cc56b5373330 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Wed, 3 Mar 2010 18:59:22 +0000 Subject: [PATCH] bug fix --- windows/sound.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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.