Hi Alexander!

Le 6 novembre 2011 12:43, Alexander <[email protected]> a écrit :
> Hello,
> sry for my big amount of questions.. this is the last issue i can't
> understand..
>
> In liquidsoap, we always have source. That we can output, e.g.
>
> 1. radio = playlist("list.m3u", mode="normal")
> 2. security = single("security.mp3")
> 3. radio = fallback(track_sensitive = false, [radio, security])
> 4. output.icecast(%mp3, .... )
>
> More of that, we can add some telnet functions, e.g. for dumping source,
> etc.
> But.. could we change streaming source by telnet commands without
> changing/stopping output?
>
> I mean, by one telnet command we can add compressor, by another - unattach
> it.
>
> 1. i don't really understand how we can execute
> radio = compress(attack=300., gain=50.,radio)
>
> in function to change radio variable that is not in function scope,
>
> 2. I am really lost how we can discard compressor for this radio :(
>
> ============================
>
> P.S. In static scrpt i can attach many effects on my source. Is it possible
> with telnet functions?
>
> Just can't imagine how it could work...if you could show one example how i
> can attach/unattach effects for already streaming source...
> It is furious... to change radiostream by ajax in realtime..
>
> Pleeeease.. help with this....

Woo! :-)

Your question is a difficult one, if not impossible.. Most of our
operators require internal stuff such as buffers and the like. As
such, it is not possible a priori to change dynamically the applied
effects on a stream chain.

What you can try, though, is to setup a condition switch. I dont think
it could work on the same source, though. So, something like this:

# Source without compression
s1 = playlist(...)

# Source with compression
s2 = compress(playlist(...))

# A conditional switch
s = switch([ (con1, s1), (cond2, s2) ]

It should then be possible to implemented the cond1 and cond2
functions (type () -> bool) to be controled though telnet, for
instance:

# cond1 function
play1 = ref false
def cond1 () =
  !play1
end

# A telnet command for cond1
def cond1_telnet(_) =
  play1 := not !play1
  "Switched play1 to #{!play1}"
end
server.register("play1", play1)

I have not tested all of this but I hope you get the idea..

Romain

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to