def setSound(self, sound): """ sets source's sound """ FMOD.stopChannel(self._channel) self._sound = sound self._channel = FMOD.createChannel(self._sound, self._mode)
def __init__(self, sound, mode=MODE.DEFAULT): """ Set source's sound, mode, creates a channel and plays it """ super() self._sound = sound self._mode = mode self._channel = FMOD.createChannel(self._sound, self._mode) self.setPosition(self.getPosition())