Nicholas Vrtis
2017-03-12 23:17:25 UTC
This is just a test script, but if I do something like this:
#!/home/liquidsoap/.opam/system/bin/liquidsoap
set("log.file",false)
set("log.stdout",true)
set("server.telnet", true)
# Need to use external address to listen on, so we can talk from external
# set("server.telnet.bind_addr","192.168.0.140")
set("server.telnet.bind_addr","192.168.0.134")
# Don't time out the telnet server
set("server.timeout",-1.0)
alsaDevice = ref "hw: Set"
s = single(id='theSingle',"FirstTest.mp3")
# This will give liquidsoap something to do while we wait for the telnet
commands
thedummy=output.dummy(id='dummyAudio',blank())
thelocal = output.alsa(id='localAudio', device="#{!alsaDevice}",
fallible=true,s)
Then in telnet I have commands which will 'list' all the outputs that have
been created.
I can also issue the telnet commands:
localAudio.status
localAudio.stop
localAudio.start
I have been beating my head trying to find how to get the same information
within a liquidsoap script.
How do I get a list of all the currently created outputs?
How can I tell if they are running or not?
How can I stop/start them (the telnet command localAudio.stop is different
than source.shutdown(thelocal). Shutdown destroys the output, but stop
simply stops sending bits out.
I must be looking at the wrong spots, but I have been pouring over the API
for quite a while and have not found anything to do this.
Thanks. Nick
#!/home/liquidsoap/.opam/system/bin/liquidsoap
set("log.file",false)
set("log.stdout",true)
set("server.telnet", true)
# Need to use external address to listen on, so we can talk from external
# set("server.telnet.bind_addr","192.168.0.140")
set("server.telnet.bind_addr","192.168.0.134")
# Don't time out the telnet server
set("server.timeout",-1.0)
alsaDevice = ref "hw: Set"
s = single(id='theSingle',"FirstTest.mp3")
# This will give liquidsoap something to do while we wait for the telnet
commands
thedummy=output.dummy(id='dummyAudio',blank())
thelocal = output.alsa(id='localAudio', device="#{!alsaDevice}",
fallible=true,s)
Then in telnet I have commands which will 'list' all the outputs that have
been created.
I can also issue the telnet commands:
localAudio.status
localAudio.stop
localAudio.start
I have been beating my head trying to find how to get the same information
within a liquidsoap script.
How do I get a list of all the currently created outputs?
How can I tell if they are running or not?
How can I stop/start them (the telnet command localAudio.stop is different
than source.shutdown(thelocal). Shutdown destroys the output, but stop
simply stops sending bits out.
I must be looking at the wrong spots, but I have been pouring over the API
for quite a while and have not found anything to do this.
Thanks. Nick