hotplug wmme: only pull default device settings from environment once, at

initialization time. it is designed to operate on the active device list,
so it was a bug to call it from ScanDeviceInfos anyhow.
This commit is contained in:
Ross Bencina 2016-09-11 23:05:26 +10:00
commit 0448f3e7b7

View file

@ -1058,6 +1058,8 @@ PaError PaWinMme_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiInd
/* Ignore the result of CommitDeviceInfos(), it is a non-failing operation */
CommitDeviceInfos( &winMmeHostApi->inheritedHostApiRep, hostApiIndex, scanResults, deviceCount );
InitializeDefaultDeviceIdsFromEnv( winMmeHostApi ); /* uses the active device list. must be called after CommitDeviceInfos */
(*hostApi)->Terminate = Terminate;
(*hostApi)->OpenStream = OpenStream;
(*hostApi)->IsFormatSupported = IsFormatSupported;
@ -1617,8 +1619,6 @@ static PaError ScanDeviceInfos( struct PaUtilHostApiRepresentation *hostApi, PaH
}
}
InitializeDefaultDeviceIdsFromEnv( winMmeHostApi );
*scanResults = outArgument;
return result;