Hi Kris, and welcome,

On Fri, Jan 23, 2009 at 4:37 PM, Kris Lipscombe <[email protected]> wrote:
> However there's two minor issues. The first is that my log if
> continually full of '[src_3490:2] Underrun! You may minimize them by
> increasing the buffer size.' The only two inputs I have are a alsa input for
> our studio and a last.fm input for fallback. Both of these have appropriate
> IDs. The message doesn't seem to effect the output, so I'm not to worried
> about it. However if someone could help me remove it from the log I would be
> very grateful.

Indeed, these messages are harmless as long as they don't appear too
often. Even then, they just say that ALSA does not get data fast
enough to produce a clean continuous output, which has no effect at
all on the icecast output -- which probably matters most for you.

Concerning the silly ID src_XXXX, I noticed it on unbuffered ALSA
outputs by default. I didn't bother to fix... I should stop being
lazy. However, if I set the id explicitly output.alsa(id="foo",..) I
don't get them anymore. Could you tell me what version of liquidsoap
you have and how exactly you setup you ALSA input/output(s)?

> The second question I have is to do with fallback notification. Currently I
> have my config set to strip the blanks from the alsa input so that silence
> in the studio causes a fallback to last.fm. However I was wondering if there
> was anyway to explicitly call a script on the transition?

You can execute arbitrary code in the transition. Suppose we have a
fallback as follows:
fallback([foo,bar])

This is the same as:
def f(a,b)
  sequence([a,b])
end
fallback(transitions=[f,f],[foo,bar])

Now if we want a notification, let's write in the logs before building
the compound source:
def f(a,b)
  log("transitioning")
  sequence([a,b])
end
fallback(transitions=[f,f],[foo,bar])

In your case, you might have a more complex transition already setup
in your fallback; you can edit it in the same way. Instead of log()
you can use system() to call a script of yours.

Finally, I'll show how to have different notifications without
duplicating the code:
def f(s,a,b)
  log(s)
  sequence([a,b])
end
fallback(transitions=[f("foo"),f("bar")],[foo,bar])
By partially applying arguments to f(), we specialized it to print
different things.

Hope this helps,
-- 
David

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to