On Thu, 10 Apr 2008, Rong-Jhe wrote: > > ALSA does not generate threads for you like this. I was referring to > > your application's audio thread, assuming that your app is indeed > > multithreaded. > > > > The duration probably varies because the call to snd_pcm_writei() will > > block until there is enough space in the ALSA ringbuffer to receive > > your data. > > > > Lee > > > > 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'. Nope, you probably use dmix plugin. This thread is only for management for shared device and has nothing to do with sample transfers. Jaroslav ----- Jaroslav Kysela <perex@xxxxxxxx> Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc. _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel