Browse Source

Add unloadSfx function.

aignacio_sf 18 years ago
parent
commit
ac89fe25bd
1 changed files with 4 additions and 0 deletions
  1. 4 0
      direct/src/showbase/Loader.py

+ 4 - 0
direct/src/showbase/Loader.py

@@ -455,6 +455,10 @@ class Loader(DirectObject):
                 cb.requests[request] = True
             return cb
 
+    def unloadSfx (self, sfx):
+        if (sfx):
+            base.sfxManagerList[0].uncacheSound (sfx.getName())
+
 ##     def makeNodeNamesUnique(self, nodePath, nodeCount):
 ##         if nodeCount == 0:
 ##             Loader.modelCount += 1