Hi, and thanks for your help.
For now, I've decided to simply stick with adding jingles to the end
of ads; I think that's an easier solution.
Another problem that I've just experienced is that I've tried to use
the "switch" peramitor to force a jingle to play at the top of the
hour. It's 15 seconds long, so in my script I have the following:
({ 0m and 0s-14s }, topofhour),
I also tried adding the "track_sensitive = false" statement to the
switch peramitor to try and force Liquidsoap to ignore a currently
playing track. However, as a result this means that the jingle simply
plays on top of the track, and the file then resumes when the jingle
has finished. If I remove the "track_sensitive = false" statement, the
jingle may not play if there are still more than 15 seconds left of
the track that's currently playing.
Does anyone have any ideas of how I can acomplish playing the jingle
at the top of the hour, without playing on top of a track?
Thanks.
Elliott.
On 28/12/2011, David Baelde <[email protected]> wrote:
> Hi list,
>
> I agree with Frederic: I don't see a simple way of doing all this
> without merging the three ads before-hand. Note that this merging
> could be done on the fly using a protocol and a little scripting (if
> re-encoding is acceptable, it should be doable with liquidsoap only).
>
> The not-simple way is to do a fair amount of scripting for the switch
> logic. One way is to use source.dynamic(), the other one is to use
> custom switching predicates. I'll detail the latter a little bit
> because it seems like the best approach here. Please note that I
> didn't have time to test this and never used this precise trick, so
> there may be quirks.
>
> First, create a function (call it next_source) which tells what should
> be played. Assuming that it returns a string, successive calls to that
> function should return:
> "song", "song", "jingle", "song", "song", "jingle", "ad", "ad", "ad",
> "jingle", "song", "song", "jingle", "song"...
> I'll let you take care of this one, you should use references to store
> the state of your system.
>
> Next, the following code will use that function to set flags saying
> what should be played:
>
> play_song = ref true
> play_jingle = ref false
> play_ad = ref false
> def update_switch()
> next = next_source()
> if next == "song" then play_song := true end
> if next == "jingle" then play_jingle := true end
> if next == "ad" then play_ad := true end
> end
>
> Finally, set up a switch to use those flags, and update flags after each
> track:
>
> source = on_track(fun(_)->update_switch(),switch([
> ({!play_song},song_source),
> ({!play_jingle},jingle_source),
> ({!play_ad},ad_source)
> # you may want to add a default, eg. ({true},song_source)
> ]))
>
>>> Also, if possible, we would like to stop Liquidsoap from crossfading
>>> between ads.
>
> That's another story, but an easy one: use metadata. You should be
> able to find some info about this on the list, or perhaps somewhere in
> the doc.
>
> Hope this helps,
> --
> David
>
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create
> new or port existing apps to sell to consumers worldwide. Explore the
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users