On Fri, Dec 30, 2011 at 7:27 PM, Josh <[email protected]> wrote: > music = smart_crossfade(fade_in=0.4,fade_out=0.4,music)
Here you are merging consecutive tracks of music. Merging two tracks results in only one track with no distinguishable in-between. > music = random(weights = [1, 2],[j, music]) Next you randomly insert jingle between tracks. A jingle will never be inserted in between merged tracks. So the insertion only works when crossfade fails to apply, which happens when the next music track gets loaded a little late (long file to download or decode, depends on your queue parameters, etc). And because it is random, when there is an opportunity to play a jingle it might play 2 in a row: the weights only control the average quota. If you want to force a strict 1 jingle, 2 songs, 1 jingle, 2 songs, then use rotate() instead of random(). But you also need to get rid of the crossfading before rotate() because it prevents inserting anything. Something like this would make more sense: music = rotate(weights=[1,2],[j,music]) # only after, merge tracks # please search the doc & mailing list for info # on how to not apply crossfade on jingles # if that's what you want music = smart_crossfade(...,music) And finally, the connection with your first mail from this thread: when rotate() and random() have a failure in one of their sources, they keep playing the other ones. That's why you get jingles instead of the fail source: the final fallback doesn't see the failure. One possibility is to move the fallback([music,fail]) before the rotate with jingles, then when the music fails, you'll get fail fail jingle fail fail jingle. Cheers, -- David ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
