wasapi: Fix default device handling.

Prior to https://github.com/mozilla/cubeb/pull/682,
a device could be default for all of
MULTIMEDIA, NOTIFICATION, and
VOICE.

After that PR, the first two were
mutually exclusive with the third, I
believe unintentionally.

Restore this behavior so that, e.g.,
on devices with only one output device,
querying for the "voice" device returns
that device.
This commit is contained in:
Miriam Zimmerman 2024-08-30 15:52:03 -04:00 коммит произвёл Paul Adenot
Родитель 8f6c9a01dd
Коммит 19d2f7bce6
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -3323,7 +3323,8 @@ wasapi_create_device(cubeb * ctx, cubeb_device_info & ret,
ret.preferred =
(cubeb_device_pref)(ret.preferred | CUBEB_DEVICE_PREF_MULTIMEDIA |
CUBEB_DEVICE_PREF_NOTIFICATION);
} else if (defaults->is_default(flow, eCommunications, device_id.get())) {
}
if (defaults->is_default(flow, eCommunications, device_id.get())) {
ret.preferred =
(cubeb_device_pref)(ret.preferred | CUBEB_DEVICE_PREF_VOICE);
}