Skip to content

Commit

Permalink
Fade duration cannot be longer than the remaining data in the source.
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Jan 4, 2024
1 parent 8e6ffd1 commit f82f3c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libs/fades.liq
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def mkfade(~type="lin", ~start=0., ~stop=1., ~duration=3., ~on_done={()}, s) =
def fade() =
if start_time() < 0. then start_time := source.time(s) end
t = source.time(s) - start_time()
duration = min(source.remaining(s), duration)

if
t >= duration
then
Expand Down

0 comments on commit f82f3c5

Please sign in to comment.