def __init__(self, name, secondary=None): self.sobj = resource.Load_Sound(name) if (secondary != None): # A different, less annoying mode. self.sobj2 = resource.Load_Sound(secondary) else: self.sobj2 = self.sobj self.schan = None
def FX(name): s = resource.Load_Sound(name) # (comes from a cache) if (s != None) and not config.cfg.mute: s.play()