Browse Source

fix for negative sound duration problem]

gregw 23 years ago
parent
commit
d78a078649
1 changed files with 1 additions and 1 deletions
  1. 1 1
      direct/src/interval/SoundInterval.py

+ 1 - 1
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