From 0448f3e7b7c79fb153030adc9531801d4ef09811 Mon Sep 17 00:00:00 2001 From: Ross Bencina Date: Sun, 11 Sep 2016 23:05:26 +1000 Subject: [PATCH] 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. --- src/hostapi/wmme/pa_win_wmme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hostapi/wmme/pa_win_wmme.c b/src/hostapi/wmme/pa_win_wmme.c index 76085e9..66645f2 100644 --- a/src/hostapi/wmme/pa_win_wmme.c +++ b/src/hostapi/wmme/pa_win_wmme.c @@ -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; -- 2.43.0