in src/cubeb_wasapi.cpp [649:663]
HRESULT STDMETHODCALLTYPE OnDeviceStateChanged(LPCWSTR device_id,
DWORD new_state)
{
XASSERT(cubeb_context->output_collection_changed_callback ||
cubeb_context->input_collection_changed_callback);
LOG("collection: Audio device state changed, id = %S, state = %lu.",
device_id, new_state);
EDataFlow flow;
HRESULT hr = GetDataFlow(device_id, &flow);
if (FAILED(hr)) {
return hr;
}
monitor_notifications.notify(flow);
return S_OK;
}