Hello everybody,

I tried Dynamic source
creation<http://savonet.sourceforge.net/doc-svn/dynamic_sources.html>script.
It works great, but really i need to add some more parameters for source
creating function (such as password for mount & mount name).
It seems a little bit hard for me to understand liquidsoap syntax, so after
about hundred of tries i decided to ask you about my problem.

I tried to make function for telnet with many params, like this:

def create_playlist(uri, mpoint) =
  # The playlist source
  s = playlist(uri)

  # The output
  output = out(s, mount=mpoint)

  # We register both source and output
  # in the list of sources
  dyn_sources :=
      list.append( [(uri,s),(uri,output)],
                    !dyn_sources )
  "Done!"
end

i understood that i have to modify server.register func (because we have 2
parameters exactly):
server.register(namespace="dynamic_playlist",
                description="Start a new dynamic playlist.",
                usage="start <uri> <mountpoint>",
                "start",
                create_playlist(uri, mountpoint))

but my tries fail, anyway i've got this error:
At line 97, char 37: the variable uri is used but was not previously
defined.

or if i leave server.register command as in example on savonet website i get
this error:
 this value has type
    (_,_)->_ (infered at line 19 char 1 - line 32 char 3)
  but it should be a subtype of
    (_)->string

it's ok, because function has 2 parameters...
is it possible to register command with server.register with many variables?
and how?
sorry for annoying about this... really lost here :)

And another question... liquidsoap syntax looks like native ocaml's but
sometimes it's different.
Can i use ocaml docs for deep learning liquidsoap syntax not to disturb you?
Liquidsoap is a great tool i really want to work with.

Thanks in advice,

-- 
Kind regards,
Alexander.
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to