9 Sep
2014
9 Sep
'14
10:24 a.m.
Bram Bos wrote:
I’m using ALSA for building a performance musical instrument, so I’m after low-latency audio output.
- I’m using asynchronous audio output (i.e. using a callback).
Don't. Many devices do not support this, and asynchronous callbacks run in a signal handler, where you must use only signal-safe functions.
- What does “File descriptor is in a bad state” mean, when it is returned by
snd_pcm_writei?
That the device is neither running, nor in an underrun state.
- what determines the playback latency of my audio stream?
The buffer size. When you fill the buffer completely, the last sample must wait for all previous samples to be played.
Regards, Clemens