Defined in carb/audio/IAudioCapture.h

typedef void (*carb::audio::DeviceChangeCallback)(Context *context, void *userData)

prototype for a device change callback function.


This callback will be performed any time an audio capture device changes its connection state. This includes when a device is connected to or disconnected from the system, or when the system’s default capture device changes.


Only the fact that a change occurred will be implied with this callback. It will not deliver specific information about the device or devices that changed (it could be many or just one). It is the callback’s responsibility to re-discover the device list information and decide what if anything should be done about the change. The changed device is not reported due to the inherently asynchronous nature of device change notifications - once the callback decides to collect information about a device it may have already changed again.


The callback will always be performed in the context of the thread that calls into the update() function. It is the callback’s responsibility to ensure that any shared resources are accessed in a thread safe manner.

Param context

[in] the context object that triggered the callback.

Param userData

[in] the user data value that was registered with the callback when the context object was created.


no return value.