Browse Source

Merge branch 'winrt' into 'master'

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()

Merged-on: https://assembla.com/code/portaudio/git/merge_requests/6241053
mr/new/c5e8f1dca7f2d1b9c3d5c92a3f6f174870c303d8
Dmitry Kostjuchenko 1 year ago
parent
commit
3215043f0d
2 changed files with 5 additions and 5 deletions
  1. 4
    4
      include/pa_win_wasapi.h
  2. 1
    1
      src/hostapi/wasapi/pa_win_wasapi.c

+ 4
- 4
include/pa_win_wasapi.h View File

@@ -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.

+ 1
- 1
src/hostapi/wasapi/pa_win_wasapi.c View File

@@ -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

Loading…
Cancel
Save