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
|
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
|
// initialization
|
||||||
int iTrialBufSize = HWBufferInfo.lMinSize;
|
int iTrialBufSize = HWBufferInfo.lMinSize;
|
||||||
int iLastTrialBufSize = HWBufferInfo.lMinSize;
|
int iLastTrialBufSize = HWBufferInfo.lMinSize;
|
||||||
|
@ -307,6 +317,7 @@ int CSound::GetActualBufferSize ( const int iDesiredBufferSizeMono )
|
||||||
iActualBufferSizeMono = iTrialBufSize;
|
iActualBufferSizeMono = iTrialBufSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return iActualBufferSizeMono;
|
return iActualBufferSizeMono;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue