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:
|
||||
// 1. Config
|
||||
// 2. Virtual if available
|
||||
// 1. Virtual sink
|
||||
// 2. Audio sink
|
||||
// 3. Host
|
||||
std::string *sink = &ref->sink.host;
|
||||
if (!config::audio.sink.empty()) {
|
||||
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;
|
||||
switch (stream->channelCount) {
|
||||
case 2:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue