10 Apr
2008
10 Apr
'08
11:24 a.m.
I found that there will be a thread generated after calling snd_pcm_open(). I use command 'ps' to check it. Due to this I guess snd_pcm_writei() only put the data into the buffer of
the
thread 'pcm'.
This thread then schedules of mixes the audio data, and put it into the
buffer
of ALSA driver. ALSA ringbuffer only belongs to ALSA library, and ALSA driver uses anoother buffer in kernel. Thus, there must be a thread that can put the data in ALSA ringbuffer into
the
buffer of ALSA driver.
I found that snd_pcm_direct_server_create() in ALSA library will create a thread. This resolves my problem that why ALSA library needn't use a daemon to mixing audio like other mixing server.