我正在为社区广播电台使用liquidspoap。当检测到静音时,liquidsoap 开始播放播放列表。
我的问题是,如果液体肥皂检测到静音,那么它会启动备份,然后在声音恢复后恢复正常,然后下次检测到静音时,它会播放备份播放列表,但这次它会继续从它的位置播放上次离开了。我只想让播放列表每次都从头开始播放?请有任何想法,我的脚本如下
#!/home/ubuntu/.opam/system/bin/liquidsoap
set("log.file",false)
set("log.stdout",true)
set("log.level",3)
# myplaylist
myplaylist = playlist("~/backup_playlist/playlist/Emergency-list.m3u",mode="normal")
backup_playlist = audio_to_stereo(myplaylist)
blank = once(single("~/blank_7_s.mp3"))
#Live local talk stream
live_local = input.http("http://test.com:8382/main.mp3")
#Live remote talk stream
live_remote=input.harbor("live_remote",port=8383,password="test",buffer=2.0)
# Talk over stream using microphone mount.
mic=input.harbor("mic",port=8383,password="test",buffer=2.0)
# If something goes wrong, we'll play this
security = single("~/backup_playlist/test.mp3")
radio = fallback(track_sensitive=false, [strip_blank(max_blank=120.,live_remote), strip_blank(max_blank=120.,live_local), backup_playlist , security])
radio = smooth_add(delay=0.65, p=0.15, normal=radio, special=strip_blank(max_blank=2.,mic))
# Stream it out
output.icecast(%mp3(bitrate=64), host="localhost", port=8382, password="test", mount="listen.mp3", genre="Talk", description="test Station Australia", $