ASIO devices have a preferred buffersize.

pass this value up so it can be used by the engine dialog.
if for some reason the engine dialog still doesn't have a buffersize selected, print an error and try 512 instead of crashing.
This commit is contained in:
Ben Loftis 2015-01-16 17:14:06 -06:00
parent 9b3f3a9fea
commit 05a612b563
5 changed files with 20 additions and 1 deletions

View file

@ -118,6 +118,7 @@ WCMRPortAudioDevice::WCMRPortAudioDevice (WCMRPortAudioDeviceManager *pManager,
m_PortAudioStream = NULL;
m_CurrentSamplingRate = DEFAULT_SR;
m_CurrentBufferSize = DEFAULT_BUFFERSIZE;
m_DefaultBufferSize = DEFAULT_BUFFERSIZE;
m_StopRequested = true;
m_pInputData = NULL;
@ -361,6 +362,7 @@ void WCMRPortAudioDevice::updateDeviceInfo (bool callerIsWaiting/*=false*/)
{
std::cout << "API::Device " << m_DeviceName << " Buffers: " << minSize << " " << maxSize << " " << preferredSize << std::endl;
m_DefaultBufferSize = preferredSize;
m_BufferSizes.push_back (preferredSize);
useDefaultBuffers = false;
}