Skip to content

Commit

Permalink
Fix invalid next track duration when track ends while buffering. #1074
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Jul 24, 2020
1 parent cc5be03 commit 3dd65be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Fixed:

- Fixed exponential memory usage in clock unification algorithm (#1272).
- Fixed rotate source order (#1279).
- Fixed invalid new track duration in `crossfade` when track ends while buffering (#1074).

1.4.2 (03-05-2020)
=====
Expand Down
4 changes: 2 additions & 2 deletions libs/fades.liq
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ def crossfade(~duration=5.,~override_duration="liq_cross_duration",
~default=(fun (a,b) -> sequence([a, b])),
~high=-15., ~medium=-32., ~margin=4.,
~minimum=(-1.),~width=2.,~conservative=true,s)
fade.out = fade.out(type="sin",duration=fade_out)
fade.in = fade.in(type="sin",duration=fade_in)
fade.out = fade.final(type="sin",duration=fade_out)
fade.in = fade.initial(type="sin",duration=fade_in)
add = fun (a,b) -> add(normalize=false,[b, a])
log = log(label="crossfade")

Expand Down
3 changes: 2 additions & 1 deletion src/operators/cross.ml
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ class cross ~kind (s : source) ~cross_length ~override_duration ~rms_width
self#save_last_metadata `After buf_frame;
self#update_cross_length buf_frame start;

if not (AFrame.is_partial buf_frame) then begin
if AFrame.is_partial buf_frame then Generator.add_break gen_after
else begin
self#slave_tick;
if after_len < before_len then f ()
end
Expand Down

0 comments on commit 3dd65be

Please sign in to comment.