diff options
| author | Comment <tim@gray.(none)> | 2013-10-01 02:35:48 +0100 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2013-10-01 02:35:48 +0100 |
| commit | 40d9f87901f28dd6d3520b83c8d07b8825ce6f9f (patch) | |
| tree | 4d33d1fb7e4000407f7e7a39f20127167f1a185e /rotord/src/rotor.h | |
| parent | 58222a5ad27e41c02b9700e16b6e31fa9b5be09c (diff) | |
sound envelope catch zero length
Diffstat (limited to 'rotord/src/rotor.h')
| -rw-r--r-- | rotord/src/rotor.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index b95a7b0..bf54883 100644 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -1009,7 +1009,7 @@ namespace Rotor { if (track_time<start_silence){ amount=0.0f; } - else if (track_time<start_peak&&attributes["begin_mode"]->value=="fade peak"){ + else if (track_time<start_peak&&attributes["begin_mode"]->value=="fade peak"&&start_peak>start_silence){ amount = (track_time-start_silence)/(start_peak-start_silence); } } @@ -1017,7 +1017,7 @@ namespace Rotor { if (track_time>end_silence){ amount=0.0f; } - else if (track_time>end_peak&&attributes["end_mode"]->value=="fade peak"){ + else if (track_time>end_peak&&attributes["end_mode"]->value=="fade peak"&&end_silence>end_peak){ amount = 1.0f-((track_time-end_peak)/(end_silence-end_peak)); } } |
