Hey,
On Tue, Jul 6, 2010 at 3:17 PM, jonas ohrstrom <[email protected]> wrote:
> what is the best/most complete way to access the documentation?
> i'm sometimes a bit lost when trying to figure out how LS is working :)
> for example i looked at the api-reference on the website or the fade.in
> question, there it does not mention the 'type' option.
The API reference on our website (or built using make doc) is supposed
to give you all details. But it appears that you just spotted a bug:
we abusively strip parameters called "type"!!! I know what's wrong
here, I should fix it soon (I've created a ticket).
> how would you achieve to register a function that can be accessed
> via telnet to switch the running source to a icecast stream (and also
> switching back..)?
> [...]
> i know this goes beyond LS, we will handle this with an icecast setup etc...
True, this is not a pure liquidsoap setup (that may be possible, but
it's probably not the best option) but liquidsoap should make it easy.
If I understand well your question, you have an input.http() or
input.harbor() and you want to control when the main script replays
it. (You also want to monitor, so input.http is simpler.) What you
need is to wrap that live source in an operator that controls when it
is available, before putting that in a fallback/switch/etc.
A first possibility is to use a switch which relies on a reference
that is set from the server:
enabled = ref false
def enable()
enabled := true
"OK"
end
server.register("enable",enable)
def disable()
enabled := false
"OK"
end
server.register("disable",disable)
s = switch([({!enabled},s)])
Now the new definition of s only appears to be ready when enabled says
so. However, that solution does not allow to interrupt a track by
disabling.
The other option is to use mix() which is more powerful. Just use s =
mix([s]) and then use the server command associated with mix to
control the volume and availability of s.
Cheers,
David
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Savonet-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-devl