andrewrk / groovebasin

Music player server with a web-based user interface.
MIT License
1.9k stars 119 forks source link

Switching speakers #459

Open mbelow opened 9 years ago

mbelow commented 9 years ago

It would be great if groovebasin allowed to switch speakers. E.g. if I have a 5.1 audio interface, and I put 2 speakers into the livingroom and one into the kitchen. Now I would like to switch between the livingroom setup and the kitchen setup in the groovebasin webinterface/remote app. Another use case might be playing cinema soundtracks in 5.1 and normal hifi audio in 2.0. So this is not only about switching between speaker pairs, but also about switching mono/stereo/surround.

(In terms of audio quality, the livingroom/kitchen setup especially makes sense if you have a good audio interface with balanced audio output in the livingroom, and use that to drive active speakers in the kitchen, instead of putting something like a Raspberry Pi with lower quality audio output there, see https://en.wikipedia.org/wiki/Balanced_audio).

This is related, but not the same as #313 -- that one is about streaming digital data, this here is about switching the analog audio signal to different outputs (through PulseAudio or similar frameworks). Both are solutions for multiroom setups.

andrewrk commented 9 years ago

This feature makes sense. And I've been meticulously supporting channel layouts as I write libsoundio. So, once I switch out SDL for libsoundio in libgroove, then I can add ability to switch channel mixing settings to libgroove, then expose the feature in node-groove, then utilize it in Groove Basin.

So that's what the roadmap looks like.

How to expose the feature in the UI is another thing to think about. Do you have any ideas about that?

One of the options the user could select would obviously be choosing to mix whatever channels the song or cinema soundtrack has into the channels available. But the other option is a bit more complicated to expose; it almost means directly allowing the user to specify the channel mixing matrix.

mbelow commented 9 years ago

Good to hear this is on the map :-) I think the speaker selection should also allow for specific volume levels per destination. Then you could expose it in Settings/Sound, right where the volume settings are found. Choosing between the available pulseaudio sinks should be enough for a start. You could replace the on/off switch with a dropdown selection, showing the available sink names plus an "off" option. Then the user could define a profile "livingroom hifi" in 2.0, "livingroom movie" in 5.1 and "kitchen" in mono.

I guess ideally the interface should allow for features that fit together, like one of the "livingroom" choices plus "kitchen", but not two livingroom settings together, maybe with a series of toggles that get greyed out if they are excluded by the current selection. But i have no idea how to decide what fits together.