


Printf(" snd_pcm_writei: OK %d\n", t0, t1 - t0, rc) Rc = snd_pcm_writei(self.handle, buf.data, buf.period_size) This is the playback function (Cython code): cdef int play_buffer(self, buffer_t *buf) nogil: My playback thread gets audio buffers from another thread which reads samples from file (hence faster than the playback rate). This is my output device configuration, opened in blocking mode (Ubuntu 16.04, PulseAudio present, default device): ALSA PulseAudio PCM I/O Plugin In this example I'm reading samples from file, to focus on the playback part. I'd like to reach the lowest latency and know the correct parameters to modify in order to make my capture-process-playback chain tolerant to variations in the audio processing time. I cannot get the correct way to write my loop to play audio and/or I don't understand correctly the meaning of start_threshold, stop_threshold and avail_min parameters for Alsa.
