bug fix in case max and min values for supported ASIO driver frame sizes are the same (software freezes in this case)
This commit is contained in:
parent
1fac1056ea
commit
c549ae90f0
1 changed files with 577 additions and 566 deletions
|
@ -263,6 +263,16 @@ int CSound::GetActualBufferSize ( const int iDesiredBufferSizeMono )
|
|||
}
|
||||
else
|
||||
{
|
||||
// ASIO SDK 2.2: "Notes: When minimum and maximum buffer size are
|
||||
// equal, the preferred buffer size has to be the same value as
|
||||
// well; granularity should be 0 in this case."
|
||||
if ( HWBufferInfo.lMinSize == HWBufferInfo.lMaxSize )
|
||||
{
|
||||
iActualBufferSizeMono = HWBufferInfo.lMinSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
// General case ------------------------------------------------
|
||||
// initialization
|
||||
int iTrialBufSize = HWBufferInfo.lMinSize;
|
||||
int iLastTrialBufSize = HWBufferInfo.lMinSize;
|
||||
|
@ -307,6 +317,7 @@ int CSound::GetActualBufferSize ( const int iDesiredBufferSizeMono )
|
|||
iActualBufferSizeMono = iTrialBufSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return iActualBufferSizeMono;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue