Hi,

What you're trying to do is quite typical, and depending on what you
want more precisely, there are a couple ways to obtain it. You could
probably search the archive of this mailing list, and the cookbook. I
had a quick look for you in the cookbook
(http://savonet.sourceforge.net/doc-svn/cookbook.html), look for the
following sections:

 "Force a file/playlist to be played at least every XX minutes"
 "Handle special events: mix or switch"
 "Switch-based transitions"

There are various ways to combine switch and delay to try to get what
you want. But it's quite tricky, as I remembered as I was writing this
mail. In any case you won't get an exact precision: if a track doesn't
end at 12h00 but only at 12h01, the clock will only be played at that
time, a bit late.

Using the other two recipes you can simply get full precision, at the
cost of disturbing the ongoing track: either by mixing the clock on
top of it (recipe #2) or interrupting the track in various ways using
a transition (#3). If you want to go #3, it's a bit tough for a
newcomer, and I'd recommend trying smooth_add() instead of add() in #2
before, to see if that's smooth enough for you.

HTH,

David

PS: I included the first draft of my mail were I describe several
attempts using switch, in case that's useful for somebody some day...

Start with the following:
  switch([ ({0m}, clock), ({true},playlist) ])

You may have tried it already, the problem is that if the clock jingle
lasts less than a second, a second one will be played. So we force a
delay between two clocks:
  switch([ ({0m}, delay(69.,clock)), ({true},playlist) ])
(A delay of 1 minute = 60 secs should be good, I just added 9 secs for
safety...)

Note that you can also get rid of the problem by using the following,
if your jingles last more than 1sec:
  switch([ ({0m0s}, clock), ({true},playlist) ])

But a bit problem still remains: if a track spans over the beginning
of a minute, the clock won't be played. The clock is only played when
a track ends precisely at the right time.

However, if you add the parameter track_sensitive=false to your
switch, it will interrupt the playlist track as soon as the clock can
play, and restart it after the jingle ends. You get one jingle per
minute, but it's a bit rough-sounding. To get it smoother, you can use
transition, but I won't develop on that now (it's in the cookbook,
though). With the track_insensitive solution, you should use the delay
and 0m, not the 0m0s trick, because then your jingle will be cut if it
lasts more than one second.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to