mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
removed unloadSfx and unloadMusic, just call del instead
This commit is contained in:
parent
f18c25abbd
commit
083477a839
@ -54,6 +54,7 @@ class SoundInterval(Interval):
|
|||||||
# Update sound based on current time
|
# Update sound based on current time
|
||||||
if (t >= self.getDuration()):
|
if (t >= self.getDuration()):
|
||||||
# If end of sound reached or stop event received, stop sound
|
# If end of sound reached or stop event received, stop sound
|
||||||
|
if self.sound:
|
||||||
self.sound.stop()
|
self.sound.stop()
|
||||||
self.ignore(self.stopEvent)
|
self.ignore(self.stopEvent)
|
||||||
elif (event == IVAL_INIT):
|
elif (event == IVAL_INIT):
|
||||||
@ -62,6 +63,7 @@ class SoundInterval(Interval):
|
|||||||
# start at the beginning
|
# start at the beginning
|
||||||
if (t < 0.1):
|
if (t < 0.1):
|
||||||
t = 0.0
|
t = 0.0
|
||||||
|
if self.sound:
|
||||||
# Start sound
|
# Start sound
|
||||||
self.sound.setTime(t)
|
self.sound.setTime(t)
|
||||||
self.sound.setLoop(self.loop)
|
self.sound.setLoop(self.loop)
|
||||||
|
@ -343,14 +343,6 @@ class ShowBase:
|
|||||||
self.notify.warning("Could not load music file %s." % name)
|
self.notify.warning("Could not load music file %s." % name)
|
||||||
return sound
|
return sound
|
||||||
|
|
||||||
def unloadSfx(self, sfx):
|
|
||||||
if sfx:
|
|
||||||
del sfx
|
|
||||||
|
|
||||||
def unloadMusic(self, music):
|
|
||||||
if music:
|
|
||||||
del music
|
|
||||||
|
|
||||||
def playSfx(self, sfx, looping = 0, interupt = 1, volume = None,
|
def playSfx(self, sfx, looping = 0, interupt = 1, volume = None,
|
||||||
time = 0.):
|
time = 0.):
|
||||||
if sfx:
|
if sfx:
|
||||||
@ -371,14 +363,6 @@ class ShowBase:
|
|||||||
music.setLoop(looping)
|
music.setLoop(looping)
|
||||||
music.play()
|
music.play()
|
||||||
|
|
||||||
def stopSfx(self, sfx):
|
|
||||||
if sfx:
|
|
||||||
sfx.stop()
|
|
||||||
|
|
||||||
def stopMusic(self, music):
|
|
||||||
if music:
|
|
||||||
music.stop()
|
|
||||||
|
|
||||||
def dataloop(self, state):
|
def dataloop(self, state):
|
||||||
# traverse the data graph. This reads all the control
|
# traverse the data graph. This reads all the control
|
||||||
# inputs (from the mouse and keyboard, for instance) and also
|
# inputs (from the mouse and keyboard, for instance) and also
|
||||||
|
Loading…
x
Reference in New Issue
Block a user