Hi, It looks like we are onto something here!
On Mon, Dec 19, 2011 at 8:14 PM, Pad Anius <padan...@gmail.com> wrote: > Do you mean that if I use something like: > > newshour = audio_to_stereo(single("http://xxx.yyy.com/newshour.mp3")) > radio = add([radio, switch([({0m0s},newhour)])]) > > then the file newshour.mp3 will NOT be cached once, and will be downloaded > **every time** before it is scheduled? Yes, the HTTP protocol isn't marked as static, so files should be downloaded for each request resolution. > I am using your second option, with an external script to download files > before they are scheduled, and the file is replaced while liquidsoap is > playing (other) files. If all files must be prepared / cached in advance by > liquidsoap and never refreshed/reloaded, then I understand that we have a > problem (a design problem in liquidsoap? can it be imporoved? ). If you replace files, you must absolutely make sure to not overwrite something that liquidsoap is currently reading. It's probably okay to overwrite a file that liquidsoap has prepared, if it is not already playing it, as long as you don't change the file format significantly. The request-based sources use a queue to avoid bad surprises, and you have various parameters to tweak the behavior of that queue. You'll find documentation on that, but the first thing is to make sure you're unhappy with the default behavior, by inspecting how many items are prepared in advance in various situations. You can do this via telnet using the <id>.queue command, request.ready, etc. Note that queued requests are not all prepared. > a) if I use a playlist with just one file, and reload the playlist after > the file has be downloaded by the external script, still liquidsoap will not > recognize that the file has changed, and will not play the file. Liquidsoap does not perform any detection of changes on files. If you tell it to reload a playlist, it reloads it, that's all. If requests were prepared from the old playlist, they remain in the queue until newer requests can replace them. > b) Also I thought that request.dynamic was meant for building a request for > a file that is changing "dynamically", but it does not work also in this > case. It's meant to get a new request every time. You feed it one request, it plays it once, asks for another one, plays it once, etc. > Maybe the solution would be to downlaod by external script, place the file > under a local web server and access the file via http or ftp, as in your > first option? It depends on various things but I'd advise to let liquidsoap download when needed. To do so, use request.dynamic() to give the next URL, and liquidsoap will download it in advance, and play it. 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 Savonet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/savonet-users