I am running Liquidsoap 1.0.1 on a Raspberry Pi. I am trying to do a
variation of the dynamic_playlist. But I keep getting the following error
when I try to run it.
At line 22 char 25 - line 27 char 57:
this value has type
(...)->active_source(_)
but it should be a subtype of
(...)->unit
(that line is the output.alsa statement)
#!/usr/bin/liquidsoap
#
# Put the log file in some directory where
# you have permission to write.
#set("log.file.path","./liquidtesting.log")
set("log.file",false)
# Print log messages to the console,
set("log.stdout", true)
# Use the telnet server for requests while testing
set("server.telnet", true)
#We have a dummy/blank source/output to keep things running
blanksource = blank(id='blanksource')
output.dummy(fallible=false, blanksource);
#A few functions/stuff we need to control the player
#we need a boolean reference to set (true|false), initially false
player_on = ref false
def turn_player_on()
#Only turn it on if it is currently off
if !player_on == false then
#set the flag it is on
player_on := true
#create the playlist and then output it to the speakers.
thelist=playlist(mode="normal", reload=1, reload_mode="rounds", "
http://localhost:3000/getNextSongFileName")
output.alsa(id='localAudio', device="hw: Set", thelist)
end
end
#A function to create 'thelist' playlist when we have node all up and ready
def turn_player_off()
#Only turn it off if it is already on
if !player_on == true then
#set the flag it is off
player_on := false
#Shutdown the node source
source.shutdown(thelist)
end
end
turn_player_off()
------------------------------------------------------------------------------
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users