Skip to content

Commit

Permalink
Disable logs when values are zero, treat them as explicit disabled
Browse files Browse the repository at this point in the history
state.
  • Loading branch information
toots committed Oct 7, 2024
1 parent 93e457a commit ba356e8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/core/operators/cross.ml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ class cross val_source ~end_duration_getter ~override_end_duration
self#log#important
"Cannot set crossfade end duration to negative value %f!"
end_duration;
frame_size)
frame_size
(* Accept zero as simplify disabled crossfade. Set to frame_size. *))
else if _end_main_duration = 0 then frame_size
(* For any non-zero too short value, warn the user. *)
else if _end_main_duration < frame_size then (
self#log#important
"Cannot set crossfade end duration to less than the frame size!";
Expand All @@ -99,7 +102,10 @@ class cross val_source ~end_duration_getter ~override_end_duration
self#log#important
"Cannot set crossfade start duration to negative value %f!"
start_duration;
frame_size)
frame_size
(* Accept zero as simplify disabled crossfade. Set to frame_size. *))
else if _start_main_duration = 0 then frame_size
(* For any non-zero too short value, warn the user. *)
else if _start_main_duration < frame_size then (
self#log#important
"Cannot set crossfade start duration to less than the frame size!";
Expand Down

0 comments on commit ba356e8

Please sign in to comment.