Exemplo n.º 1
0
 def __init__(self, audio_rate, latency):
     self._started = False
     self._audio_source = None
     self._pa = Simple('Kunquat Tracker',
                       'Editor output',
                       rate=audio_rate,
                       latency=latency)
Exemplo n.º 2
0
class Pushaudio():
    def __init__(self, audio_rate, latency):
        self._started = False
        self._audio_source = None
        self._pa = Simple('Kunquat Tracker',
                          'Editor output',
                          rate=audio_rate,
                          latency=latency)

    def set_audio_source(self, audio_source):
        self._audio_source = audio_source

    def put_audio(self, audio_data):
        assert self._started
        (left, right) = audio_data
        if len(left) > 0:
            self._pa.write(left, right)
        self._audio_source.acknowledge_audio()

    def start(self):
        self._started = True

    def stop(self):
        pass

    def close(self):
        self.stop()
        del self._pa

    @classmethod
    def get_id(cls):
        return 'pushaudio'
Exemplo n.º 3
0
class Pushaudio():

    def __init__(self, latency):
        self._started = False
        self._audio_source = None
        self._pa = Simple('Kunquat Tracker',
                          'Editor output',
                          latency=latency)

    def set_audio_source(self, audio_source):
        self._audio_source = audio_source

    def put_audio(self, audio_data):
        assert self._started
        (left, right) = audio_data
        if len(left) > 0:
            self._pa.write(left, right)
        self._audio_source.acknowledge_audio()

    def start(self):
        self._started = True

    def stop(self):
        pass

    def close(self):
        self.stop()
        del self._pa

    @classmethod
    def get_id(cls):
        return 'pushaudio'
Exemplo n.º 4
0
 def __init__(self, latency):
     self._started = False
     self._audio_source = None
     self._pa = Simple('Kunquat Tracker',
                       'Editor output',
                       latency=latency)