Hi Martin,

my best attempt was this:

[stream]
property = application.process.binary@equals:"snapclient"
group = player

[group]
name   = snapserver
flags  = set_sink
sink   = sink.snapserver
source = sink.null.monitor

[stream]
property = application.name@equals:"harbour-unplayer"
group = snapserver

This way one can route one specific player to the sink at least.
But of course it would be nice to do this dynamically (e.g. when snapserver is running or when the user chooses to do so).

I guess xpolicy can do this, but I didn't find any documentation for this.

BR, Michael.


Am 14.02.2018 um 06:31 schrieb Martin Kampas:
Hi Michael,

Maybe editing /etc/pulse/xpolicy.conf could help you. Sources and
possibly more information can be found here
https://github.com/mer-hybris/droid-hal-configs/tree/master/sparse/etc/pulse
.

BR, Martin ________________________________________ From: Devel
[devel-boun...@lists.sailfishos.org] on behalf of Michael Fuchs
[mic...@gmx.at] Sent: Thursday, February 01, 2018 6:16 PM To:
devel@lists.sailfishos.org Subject: [SailfishDevel] Route media sound
stream to FIFO

Hi,

I built snapcast for SailfishOS [2]. Snapcast is a "Synchronous
multi-room audio player". [1]

Everything works as expected now. Next step is the integration into
Sailfish user experience. It should be simple to create a GUI, which
starts/stops the snapclient.

But I don't know how to solve the server part of snapcast. Snapserver
reads audio data from a FIFO buffer and broadcasts it to the
network. Creating a pulseaudio FIFO sink is clear to me. Either you
write it into the config file pulse audio config file or load it via
pacmd:

$ pacmd load-module module-pipe-sink file=/tmp/snapfifo
sink_name=Snapcast $ pacmd update-sink-proplist Snapcast
device.description=Snapcast

But how do I route the media streams from the default sink to the
FIFO-sink as soon as snapserver is running? (Like when you plug in a
headphone or connect to a bluetooth device.)

Thanks for any advice.

cheers, Michael.



[1] https://github.com/badaix/snapcast [2]
https://build.merproject.org/package/show/home:fooxl:sailfish/snapcast



_______________________________________________ SailfishOS.org Devel
mailing list To unsubscribe, please send a mail to
devel-unsubscr...@lists.sailfishos.org _______________________________________________ SailfishOS.org Devel
mailing list To unsubscribe, please send a mail to
devel-unsubscr...@lists.sailfishos.org

_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Reply via email to