From d78a078649a3717b4de15e96cec37a3022c2495f Mon Sep 17 00:00:00 2001 From: gregw <> Date: Tue, 24 Sep 2002 18:12:54 +0000 Subject: [PATCH] fix for negative sound duration problem] --- direct/src/interval/SoundInterval.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direct/src/interval/SoundInterval.py b/direct/src/interval/SoundInterval.py index 70524eb0bd..612ae72e19 100644 --- a/direct/src/interval/SoundInterval.py +++ b/direct/src/interval/SoundInterval.py @@ -32,7 +32,7 @@ class SoundInterval(Interval.Interval): self.startTime = startTime # If no duration given use sound's duration as interval's duration if duration == 0.0 and self.sound != None: - duration = self.sound.length() - self.startTime + duration = max(self.sound.length() - self.startTime, 0) if (duration == 0): self.notify.warning('zero length duration!') # MPG - hack for Miles bug