for-all-host:~# ./liqu.liq Error when initializing source at line 15, char 8-16: a source cannot belong to two clocks (cross_4284[], wallclock_ao[]).
#!/usr/local/bin/liquidsoap set("init.daemon",true) set("init.daemon.pidfile",false) set("log.file.path","/tmp/liquidsoap.log") # telnet server для использования liGUIdsoap set("server.telnet", true) # функция кроссфейда, здесь желательно ни чего не менять def crossfade(~start_next,~fade_in,~fade_out,s) s = fade.in(duration=fade_in,s) s = fade.out(duration=fade_out,s) fader = fun (a,b) -> add(normalize=false,[b,a]) cross(fader,s) end #дневной плейлист day = out(playlist("/root/test/day.txt")) #ночной night = out(playlist("/root/test/night.txt")) #Джинглы jingles = out(playlist("/root/test/jingls.txt")) myplay = switch([({ 3h-23h }, day),({ 23h-3h }, night)]) def smooth_add(~delay=0.5,~p=0.2,~normal,~special) d = delay fade.final = fade.final(duration=d*2.) fade.initial = fade.initial(duration=d*2.) q = 1. - p c = amplify fallback(track_sensitive=false, [special,normal], transitions=[ fun(normal,special)-> add(normalize=false, [c(p,normal), c(q,fade.final(type="sin",normal)), sequence([blank(duration=d),c(q,special)])]), fun(special,normal)-> add(normalize=false, [c(p,normal), c(q,fade.initial(type="sin",normal))]) ]) end #построение плейлиста с кроссфейдом #fade_out - затухание предыдущей песни в сек #fade_in - нарастание следующей песни в сек radioq = mksafe(crossfade(start_next=1.,fade_out=7.,fade_in=7.,myplay)) radio = smooth_add(normal=radioq,special=switch([({ 20m0s or 50m0s }, jingles)])) #radio = random(weights = [1, 4],[jingles, myplay]) #запускаем вещалку output.icecast(%mp3, host = "46.4.207.220", port = 9000, password = "216937612", mount = "non-stop",name="OnLY DanCe Radio ~ RJ^NOED ~net", description="Club Music For LIVE", genre="Club House",url="http://onlydc.ru",radio)
def smooth_add(~delay=0.5,~p=0.8,~normal,~special) d = delay fade.final = fade.final(duration=d*1.) fade.initial = fade.initial(duration=d*2.) q = 0.7 c = amplify fallback(track_sensitive=false, [special,normal], transitions=[ fun(normal,special)-> add(normalize=false, [c(p,normal), c(q,fade.final(type="log",normal)), sequence([blank(duration=d),c(q,special)])]), fun(special,normal)-> add(normalize=false, [c(p,normal), c(q,fade.initial(type="log",normal))]) ]) end
radio = smooth_add(normal=radio,special=switch([({ 0m0s or 10m0s or 20m0s or 30m0s or 40m0s or 50m0s }, jingles_overlay)]))
switch([({ 0m0s or 10m0s or 20m0s or 30m0s or 40m0s or 50m0s }
liquidsoap.exe название файла конфига(test.liq) @pause (@pause можно не писать)