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:
parent
78737d7611
commit
fbb77aa7cd
1 changed files with 5 additions and 3 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue