Hi Marc, Sorry, my previous reply was wrong, indeed. What you should write is something like the following, passing directly the single(..) source to prepend: $ src/liquidsoap 's=single(argv(1)) output.dummy(mksafe(prepend(playlist(argv(2)),fun(_)->s)))' -- somefile.mp3 someplaylist_or_directory
I believe you adapted dolebrai's code. In dolebrai, it's a bit complex because what we want to prepend is given in the metadata, so we have to create the source on the fly. Now, I'm not sure why we used a queue and not a single... On Wed, Oct 28, 2009 at 4:57 AM, Marc Setterich <[email protected]> wrote: > No it's not like that. ATM there is one playlist with german advertisement > between the regular music tracks. If this advertisement is loaded the script > should trigger a function and replace it on the other language mountpoints, > so that on each channel the advertisment will be played in the correct > language. I figured out that prepend will most likely do the job, even if > it's not a real replacement, but to given conventions (advertisements must > have the same length) it'll work, because the german playlist will trigger a > track switch at the end of its advertisement, which effects all other > channels as well. I'm not sure to see why and how this would work then. What I didn't get at first is that you're using liquidsoap and its prepend operator on an external stream. So yes, when you prepend it won't suspend the external streaming, and you'll get a replacement. But if you trigger prepend at the beginning of the track following the advertisement, the prepended advertisement will be over the music track, not over the german ad. You cannot go back in time. If you want to replace one thing with another, I'd go for a switch rather than a prepend. > I'm now using rev(6874) and experiencing a similar error with my script: > 2009/10/28 10:15:13 [src_5595:2] #get_frame didn't add exactly one break! I have tried a script that should behave pretty much like what you have, but didn't get a crash: $ src/liquidsoap 's=fail() output.dummy(mksafe(prepend(input.http("http://dolebrai.net:8000/dolebrai.ogg"),fun(_)->s)))' [...] 2009/10/28 16:57:49 [src_4449:3] Candidate to prepending not ready. Abort! [...keeps going fine...] Are you sure you ran the newly compiled version? If so, please come back to us quickly to prevent us from releasing! Also, if you could give a minimal example that crashes, that would help. Thanks. -- David ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
