Prefer primary DirectSound device on Windows
It automatically selects the default device for use, there is no book keeping necessary and things just work The primary DirectSound device has a (NULL) guid, making it wasy to be found.
This commit is contained in:
parent
854818133e
commit
064541dd2b
|
@ -326,6 +326,14 @@ public class Dino.Plugins.Rtp.Plugin : RootInterface, VideoCallPlugin, Object {
|
|||
bool right_is_default = false;
|
||||
right.device.properties.get_boolean("is-default", out right_is_default);
|
||||
|
||||
// default DirectSound device on Windows has (NULL) as guid
|
||||
if (left.device.properties.get_string("device.guid") == "(NULL)") {
|
||||
left_is_default = true;
|
||||
}
|
||||
if (right.device.properties.get_string("device.guid") == "(NULL)") {
|
||||
right_is_default = true;
|
||||
}
|
||||
|
||||
// Prefer pipewire
|
||||
if (left_is_pipewire && !right_is_pipewire) return -1;
|
||||
if (right_is_pipewire && !left_is_pipewire) return 1;
|
||||
|
|
Loading…
Reference in a new issue