From: dmitrykos Date: Mon, 2 Apr 2018 19:15:49 +0000 (+0300) Subject: wasapi: correction to PaWasapi_UpdateDeviceList() API by making it unavailable by... X-Git-Tag: v19.7.0~142^2 X-Git-Url: https://andrewgundersen.net/repos?a=commitdiff_plain;h=d3e65ce690c2cd55fd9d5df5a509d549eff17c1c;p=portaudio wasapi: correction to PaWasapi_UpdateDeviceList() API by making it unavailable by default unless PA_WASAPI_MAX_CONST_DEVICE_COUNT is explicitly defined --- diff --git a/include/pa_win_wasapi.h b/include/pa_win_wasapi.h index 3d35379..a863706 100644 --- a/include/pa_win_wasapi.h +++ b/include/pa_win_wasapi.h @@ -292,10 +292,10 @@ PaWasapiStreamInfo; /** Update device list. - This function will be available if PA_WASAPI_MAX_CONST_DEVICE_COUNT is defined with maximum - constant WASAPI device count (defined by default with value 32). - If PA_WASAPI_MAX_CONST_DEVICE_COUNT is set to 0 during compile time the implementation will not - define PaWasapi_UpdateDeviceList() and thus updating device list can only be possible by calling + This function is available if PA_WASAPI_MAX_CONST_DEVICE_COUNT is defined during compile time + with maximum constant WASAPI device count (recommended value - 32). + If PA_WASAPI_MAX_CONST_DEVICE_COUNT is set to 0 (or not defined) during compile time the implementation + will not define PaWasapi_UpdateDeviceList() and thus updating device list can only be possible by calling Pa_Terminate() and then Pa_Initialize(). @return Error code indicating success or failure. diff --git a/src/hostapi/wasapi/pa_win_wasapi.c b/src/hostapi/wasapi/pa_win_wasapi.c index d112902..d1d0278 100644 --- a/src/hostapi/wasapi/pa_win_wasapi.c +++ b/src/hostapi/wasapi/pa_win_wasapi.c @@ -50,7 +50,7 @@ // Max device count (if defined) causes max constant device count in the device list that // enables PaWasapi_UpdateDeviceList() API and makes it possible to update WASAPI list dynamically #ifndef PA_WASAPI_MAX_CONST_DEVICE_COUNT - #define PA_WASAPI_MAX_CONST_DEVICE_COUNT 32 + #define PA_WASAPI_MAX_CONST_DEVICE_COUNT 0 // Force basic behavior by defining 0 if not defined by user #endif // WinRT