def setUp(self): self.outstream = None self.s = soundio.create() soundio.connect_backend(pysoundio.SoundIoBackendDummy) soundio.flush() default_index = soundio.default_output_device_index() self.device = soundio.get_output_device(default_index) self.buffer = soundio.input_ring_buffer_create(44100 * 8)
def setUp(self): self.s = soundio.create() soundio.connect_backend(pysoundio.SoundIoBackendDummy) soundio.flush() self.buffer = soundio.input_ring_buffer_create(44100) # Fill with some data for libsoundio < v1.1.0 data = bytearray(b'' * 42) soundio.ring_buffer_write_ptr(self.buffer, data, len(data)) soundio.ring_buffer_advance_write_ptr(self.buffer, 42)
def flush(self): """ Atomically update information for all connected devices. """ soundio.flush()
def setUp(self): self.device = None self.s = soundio.create() soundio.connect_backend(pysoundio.SoundIoBackendDummy) soundio.flush()