mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
fix for no sound enabled
This commit is contained in:
parent
083ae49ef0
commit
93d73a2b4e
@ -52,28 +52,32 @@ class SoundInterval(Interval.Interval):
|
||||
t1 = t + self.startTime
|
||||
if (t1 < 0.1):
|
||||
t1 = 0.0
|
||||
self.sound.setVolume(self.volume)
|
||||
self.sound.setTime(t1)
|
||||
self.sound.setLoop(self.loop)
|
||||
self.sound.play()
|
||||
if self.sound != None:
|
||||
self.sound.setVolume(self.volume)
|
||||
self.sound.setTime(t1)
|
||||
self.sound.setLoop(self.loop)
|
||||
self.sound.play()
|
||||
self.state = CInterval.SStarted
|
||||
self.currT = t1
|
||||
|
||||
def privStep(self, t):
|
||||
if self.state == CInterval.SPaused:
|
||||
# Restarting from a pause.
|
||||
self.sound.setVolume(self.volume)
|
||||
self.sound.setTime(t)
|
||||
self.sound.setLoop(self.loop)
|
||||
self.sound.play()
|
||||
if self.sound != None:
|
||||
self.sound.setVolume(self.volume)
|
||||
self.sound.setTime(t)
|
||||
self.sound.setLoop(self.loop)
|
||||
self.sound.play()
|
||||
self.state = CInterval.SStarted
|
||||
self.currT = t
|
||||
|
||||
def privFinalize(self):
|
||||
self.sound.stop()
|
||||
if self.sound != None:
|
||||
self.sound.stop()
|
||||
self.currT = self.getDuration()
|
||||
self.state = CInterval.SFinal
|
||||
|
||||
def privInterrupt(self):
|
||||
self.sound.stop()
|
||||
if self.sound != None:
|
||||
self.sound.stop()
|
||||
self.state = CInterval.SPaused
|
||||
|
Loading…
x
Reference in New Issue
Block a user