]> Repos - portaudio/commit
wasapi: new WASAPI specific API PaWasapi_UpdateDeviceList() which allows to update...
authordmitrykos <dmitrykos@neutroncode.com>
Mon, 2 Apr 2018 18:50:16 +0000 (21:50 +0300)
committerdmitrykos <dmitrykos@neutroncode.com>
Mon, 2 Apr 2018 18:50:16 +0000 (21:50 +0300)
commiteb622874941be95ba27842f4373c6801092b2adb
treecd358ddf78b108f050af7d5eadd7ecf6ed5d4e63
parenta525c38289b8c98554952caae792c2d1794d589c
wasapi: new WASAPI specific API PaWasapi_UpdateDeviceList() which allows to update WASAPI device list dynamically without a need to call Pa_Terminate() and then Pa_Initialize().

This new implementation overcomes current limitation of Pa_GetDeviceCount() API which gives constant device count by making WASAPI device list constant (32 devices by default) where 32 device slots can either be filled with a real device info or be empty for a future device changes.

Constant device list size can be altered by PA_WASAPI_MAX_CONST_DEVICE_COUNT define during a compile time. If PA_WASAPI_MAX_CONST_DEVICE_COUNT is set to 0 then PaWasapi_UpdateDeviceList() will be unavailable as well as dynamic device list update functionality.

This implementation also detects the audio device format change if user alters it via Windows Audio Controller GUI.

This implementation also makes WASAPI backend ready for a future implementation of device list updates via PortAudio public API. See internal PaError UpdateDeviceList().
include/pa_win_wasapi.h
src/hostapi/wasapi/pa_win_wasapi.c