Skip to content

Commit

Permalink
wasapi: Fix default device handling.
Browse files Browse the repository at this point in the history
Prior to #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.
  • Loading branch information
mutexlox-signal authored and padenot committed Sep 6, 2024
1 parent 8f6c9a0 commit 19d2f7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cubeb_wasapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 19d2f7b

Please sign in to comment.