Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crossfading not working with cue_cut #874

Closed
jdbuys opened this issue Jul 8, 2019 · 3 comments
Closed

Crossfading not working with cue_cut #874

jdbuys opened this issue Jul 8, 2019 · 3 comments
Milestone

Comments

@jdbuys
Copy link
Contributor

jdbuys commented Jul 8, 2019

Describe the bug
The songs are not crossfading when I have cue_cut included.
It also looks like the cue_cut and crossfade metadata like 'liq_cue_out', 'liq_cue_in' is not always applied.

To Reproduce

#!/usr/local/bin/liquidsoap
set("log.file.path","radio.log")
set("log.stdout", true)
set("server.telnet",false)
set("server.socket",true)
set("server.socket.path","lsoap.sock")
set("server.socket.permissions",511)
set("server.timeout",20.)
set("scheduler.generic_queues",2)
set("scheduler.non_blocking_queues",2)
set("scheduler.fast_queues",0)
set("scheduler.log",true)
set("init.catch_exn",true)
set("log.level",5)

delay = ref 3.
#Add error handler
def error_handler(the_error)=
  ignore(interactive.string("error_value",the_error))
  if string.match(pattern="401",the_error) == true then
    delay := 30.
  else
    delay := !delay
  end
  !delay
end

def crossfade(s)
  fade.in = fade.in(duration=5.0)
  fade.out = fade.out(duration=5.0)
  fader = fun (_,_,_,_,a,b) -> add(normalize=false,[fade.in(b),fade.out(a)])
  cross(duration=10.0,fader,s)
end

source = playlist(prefix="annotate:liq_cue_in=\"1.\",liq_cue_out=\"60\":",
             "/tmp/playlist.pls")
source = cue_cut(crossfade(source))
source=mksafe(source)
add_skip_command(source)
source=audio_to_stereo(id="source",source)


output.icecast(%mp3(stereo=true,bitrate=64,samplerate=44100),id="icecast",host="2.2.2.2",port=80,user="source",password="hackme",fallible=true,on_error=error_handler,name="Test",description="Test",mount="test",source)

Expected behavior
I would expect the songs to crossfade even when cue_cut is applied.

Version details

  • OS: Ubuntu 19:04
  • Version 1.4.0-beta2]

Install method
From source

@smimram smimram added this to the 1.4.0 milestone Jul 8, 2019
@toots
Copy link
Member

toots commented Jul 9, 2019

You should apply cue_cut after crossfade! 🙂

@jdbuys
Copy link
Contributor Author

jdbuys commented Jul 9, 2019

I have tried putting it before and after crossfade, and unfortunately no crossfading happens.

If the cue-cut is after the crossfade then the cue_cut works every time, but the crossfade does not.

If I put the cue_cut before the crossfade, then the cue_cut and crossfade works only once.

@toots toots closed this as completed in 2494ce2 Jul 12, 2019
@toots
Copy link
Member

toots commented Jul 12, 2019

Fixed, thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants