- WasapiEngine: Use default device if there's only one device available, since we don't show the combobox anyway.

git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@219 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
This commit is contained in:
sinamas 2009-01-09 21:49:18 +00:00
parent 0bafc3004d
commit 1e4fe51206

View File

@ -196,7 +196,7 @@ int WasapiEngine::doInit(const int rate, const unsigned latency) {
goto fail;
}
if (deviceSelector->count() > 0)
if (deviceSelector->count() > 1)
hr = pEnumerator->GetDevice(deviceSelector->itemData(deviceIndex).value<std::wstring>().c_str(), &pDevice);
else
hr = pEnumerator->GetDefaultAudioEndpoint(eRender, eConsole, &pDevice);