Prefer virtual sink over audio sink if host playback is disabled
Fixes "Play audio on host PC" option not working when audio sink is manually set
This commit is contained in:
+5
-3
@@ -153,14 +153,16 @@ namespace audio {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Order of priority:
|
// Order of priority:
|
||||||
// 1. Config
|
// 1. Virtual sink
|
||||||
// 2. Virtual if available
|
// 2. Audio sink
|
||||||
// 3. Host
|
// 3. Host
|
||||||
std::string *sink = &ref->sink.host;
|
std::string *sink = &ref->sink.host;
|
||||||
if (!config::audio.sink.empty()) {
|
if (!config::audio.sink.empty()) {
|
||||||
sink = &config::audio.sink;
|
sink = &config::audio.sink;
|
||||||
}
|
}
|
||||||
else if (ref->sink.null) {
|
|
||||||
|
// Prefer the virtual sink if host playback is disabled or there's no other sink
|
||||||
|
if (ref->sink.null && (!config.flags[config_t::HOST_AUDIO] || sink->empty())) {
|
||||||
auto &null = *ref->sink.null;
|
auto &null = *ref->sink.null;
|
||||||
switch (stream->channelCount) {
|
switch (stream->channelCount) {
|
||||||
case 2:
|
case 2:
|
||||||
|
|||||||
Reference in New Issue
Block a user