Fix device selection changing system default instead of only QBZ
PROBLEM: When selecting an audio device in QBZ settings, the app was changing the system-wide PipeWire default sink, affecting all applications. ROOT CAUSE: handleOutputDeviceChange() was calling set_pipewire_default_sink(), which changes the PipeWire default for the entire system. FIX: Removed set_pipewire_default_sink() call. The backend reinit_audio_device() already handles opening a specific device for QBZ without changing the system default. Now QBZ uses the selected device independently from the system default.
This commit is contained in:
1 parent
13e2ea708a
commit
586a0de358
1 file changed
+1
-5
@@ -831,13 +831,9 @@
|
|||||||
// Save the preference
|
// Save the preference
|
||||||
await invoke('set_audio_output_device', { device: deviceToStore });
|
await invoke('set_audio_output_device', { device: deviceToStore });
|
||||||
|
|
||||||
// If a specific device was selected, set it as the PipeWire default
|
|
||||||
if (sinkName) {
|
|
||||||
await invoke('set_pipewire_default_sink', { sinkName });
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reinitialize audio to use the selected device
|
// Reinitialize audio to use the selected device
|
||||||
// IMPORTANT: Pass the actual sink name, not null
|
// IMPORTANT: Pass the actual sink name, not null
|
||||||
|
// This opens the specific device for QBZ without changing system default
|
||||||
await invoke('reinit_audio_device', { device: deviceToStore });
|
await invoke('reinit_audio_device', { device: deviceToStore });
|
||||||
|
|
||||||
console.log('Audio output device changed:', description, '(sink:', sinkName ?? 'default', ')');
|
console.log('Audio output device changed:', description, '(sink:', sinkName ?? 'default', ')');
|
||||||
|
|||||||
Reference in new issue
Block a user