Ejemplo n.º 1
0
 def __init__(self, channel, fileName):
     self._mixstream = VorbisFileMixStream(fileName)
     self._channel = channel
Ejemplo n.º 2
0
 def __init__(self, channel, fileName):
     self._mixstream = VorbisFileMixStream(fileName)
     self._channel = channel
Ejemplo n.º 3
0
class StreamingSound(object):
    def __init__(self, channel, fileName):
        self._mixstream = VorbisFileMixStream(fileName)
        self._channel = channel

    def play(self):
        self._mixstream.play(self._channel.id)

    def stop(self):
        self._mixstream.stop()
        self._channel.stop()

    def setVolume(self, volume):
        self._channel.setVolume(volume)

    def isPlaying(self):
        return self._mixstream.is_playing()

    def fadeout(self, time):
        # TODO
        self.stop()

    def getPosition(self):
        return self._mixstream.get_position()

    def setPosition(self, position):
        return self._mixstream.seek(position)

    def setPitchBendSemitones(self, semitones):
        self._mixstream.set_pitch_semitones(semitones)

    def setSpeed(self, factor):
        self._mixstream.set_speed(factor)
Ejemplo n.º 4
0
class StreamingSound(object):
    def __init__(self, channel, fileName):
        self._mixstream = VorbisFileMixStream(fileName)
        self._channel = channel

    def play(self):
        self._mixstream.play(self._channel.id)

    def stop(self):
        self._mixstream.stop()
        self._channel.stop()

    def setVolume(self, volume):
        self._channel.setVolume(volume)

    def isPlaying(self):
        return self._mixstream.is_playing()

    def fadeout(self, time):
        # TODO
        self.stop()

    def getPosition(self):
        return self._mixstream.get_position()

    def setPosition(self, position):
        return self._mixstream.seek(position)

    def setPitchBendSemitones(self, semitones):
        self._mixstream.set_pitch_semitones(semitones)

    def setSpeed(self, factor):
        self._mixstream.set_speed(factor)