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

@ -59,6 +59,7 @@ struct DeviceInfo
std::vector<int> m_AvailableSampleRates;
unsigned int m_MaxInputChannels;
unsigned int m_MaxOutputChannels;
unsigned int m_DefaultBufferSize;
DeviceInfo():
m_DeviceId(-1), m_DeviceName("Unknown"), m_MaxInputChannels(0), m_MaxOutputChannels(0)
@ -198,6 +199,7 @@ protected:
std::vector<std::string> m_OutputChannels; ///< List of output channel names.
std::vector<int> m_SamplingRates; ///< List of available sampling rates.
std::vector<int> m_BufferSizes; ///< List of available buffer sizes.
int m_DefaultBufferSize; ///soundcard preferred buffer size
int m_CurrentSamplingRate; ///< Currently selected sampling rate.
int m_CurrentBufferSize; ///< Currently selected buffer size.