Le vendredi 18 décembre 2009 09:04:05, Denis Pankratov a écrit :
> Hi,
Hi !
> I need help.
You've come to the right place :-)
> I'm trying to setup a muslim radio using liquidsoap and I ran into a
> specific case.
>
> We have a regular playlist which is playing in cycles during the day.
> And now we need to broadcast prayers during the day at specific time.
>
> So the main stream must fade out permanenly at that time then the
> prayer is played(local mp3 file)and then we fade in to continue
> interrupted source.
> Every day this praying schedule is different.
> example:
> 2009-12-03 7:28 8:38 12:20 13:44 16:01 17:10
> …
> 2009-12-17 7:43 8:54 12:26 13:43 15:57 17:08
> 2009-12-18 7:43 8:55 12:27 13:43 15:57 17:08
>
> Is that possible at all ?
Yes, sure !
> So my questions is how to setup this in proper way.
There are various way of doing this. I will tell you the one I
find the most convenient for you.
Since I guess the times and prayers are different every time,
it is not a good idea to list them in the script. On the contrary,
I think you should use an external script. Basically, you could
have the following:
8<------------------------------->8
# Activate telnet server:
set("server.telner",true)
# A regular source
s = (...)
# A queue of requests to push the prayers
r = request.queue(id="prayers")
# We mix the two sources:
s = fallback(track_sensitive=false,[r,s])
8<------------------------------->8
This script will play s where there is nothing in the
prayers queue, and switch immediatly to r as soon
as a new request is added.
You could use this with an external script via the
telnet server. If you activate the telnet server, the
external script can push a new request to the queue
each time a prayer should be broadcasted.
This way, you can seperate the complexity and write
your own script that is responsible for pushing the
required mp3 file at the required time.
You can push a request manually to test:
telnet localhost 1234
(...)
prayers.push /path/to/file.mp3
We also include a code example for interfacing with
telnet in perl our script/ directory in the source tree:
http://savonet.rastageeks.org/browser/trunk/liquidsoap/scripts/ask-liquidsoap.pl
With a litlle more experience, you can also include a
transition when switching to the prayer, with for instance
a fade out and a skip of the current song in s so that it
smoothly transition to the prayer and restart with a new
song afterwards.
You can see the other thread in this ml, I should be posting
a code sample for this very soon :-)
Have fun, and don't hesitate to come back to us if you
have more questions.
Romain
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users