зеркало из https://github.com/mozilla/cubeb.git
wasapi: notify when a device is disabled. BMO 1546872
This commit is contained in:
Родитель
3570749942
Коммит
64aa80f330
|
@ -485,16 +485,12 @@ public:
|
|||
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);
|
||||
if (new_state == DEVICE_STATE_ACTIVE ||
|
||||
new_state == DEVICE_STATE_NOTPRESENT ||
|
||||
new_state == DEVICE_STATE_UNPLUGGED) {
|
||||
EDataFlow flow;
|
||||
HRESULT hr = GetDataFlow(device_id, &flow);
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
monitor_notifications.notify(flow);
|
||||
EDataFlow flow;
|
||||
HRESULT hr = GetDataFlow(device_id, &flow);
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
monitor_notifications.notify(flow);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче