snapcast icon indicating copy to clipboard operation
snapcast copied to clipboard

Cross fade meta channels (was: *feature request* Notification channel)

Open atroposua opened this issue 3 years ago • 5 comments

I wonder if it possible to add some kind of "notification" stream. I want to use snapcast for notifications from openhab (doorbell, alarm, etc), but now to play a notification I need to switch to "openhab" stream, play notification and switch back. It would be great to have an "alarm" stream which, when it has something to play, turns volume of current stream a bit down, plays sound and puts the volume of the main stream back, just like notifications in Android or iOS.

atroposua avatar Sep 30 '20 19:09 atroposua

You can use the brand new meta stream source as already requested in #402, #569, #666 or use a script that switches to the active stream as referenced in #402 and #569.

badaix avatar Sep 30 '20 19:09 badaix

yeah, that's a solution, but my idea was playing a notification without turning the music off completely, just turning down volume a bit while playing a notification it would be the same, basically, just sound a bit nicer :)

anyway, thank you so much for such a great project!

atroposua avatar Sep 30 '20 19:09 atroposua

I was already thinking about this. It would be an extension to the meta stream (selectable with some mode flag). Mixing different streams is more complicated than just switching between streams, because they have to be synchronized and buffered. I'm happy to accept pull requests :)

badaix avatar Sep 30 '20 20:09 badaix

As a work around you might be able to use pulseaudio's built-in module "cork". Play a notifciation sound tagged as a system or communication event and the cork module will tune down the volume of other streams.

vKnmnn avatar Oct 16 '20 22:10 vKnmnn

+1 for @atroposua feature request but the meta feature is a nice "gift" until crossfade might be implemented. Anyway the meta channel works great for me. Thanks a lot @badaix for this.

yellowonblack avatar Oct 19 '20 09:10 yellowonblack