mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-08-10 00:52:16 +00:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user