All of lore.kernel.org
 help / color / mirror / Atom feed
* Little question about ALSA callbacks
@ 2005-07-27  9:28 Alfredo
  2005-07-27  9:48 ` Takashi Iwai
  2005-07-27 10:05 ` Joern Seger
  0 siblings, 2 replies; 5+ messages in thread
From: Alfredo @ 2005-07-27  9:28 UTC (permalink / raw)
  To: alsa-devel@lists.sourceforge.net

[-- Attachment #1: Type: text/plain, Size: 1647 bytes --]

Hello, I have read the article "Introduction to Sound Programming with
ALSA from Linux Journal. This article explains:



// Starts here:
------------------------------------------------------------------------
-------------------------------------------

"In the previous examples, the PCM streams were operating in blocking
mode, that is, the calls would not return until the data had been
transferred. In an interactive event-driven application, this situation
could lock up the application for unacceptably long periods of time.
ALSA allows opening a stream in nonblocking mode where the read and
write functions return immediately. If data transfers are pending and
the calls cannot be processed, ALSA returns an error code of EBUSY.

Many graphical applications use callbacks to handle events. ALSA
supports opening a PCM stream in asynchronous mode. This allows
registering a callback function to be called when a period of sample
data has been transferred."

// Finishes here:
------------------------------------------------------------------------
-------

I'm developing an event driven Linux server that will use ALSA library.
Please, could you point me to some resources in order to learn how to
use alsa in asynchronous mode (the event driven mechanism will be based
in poll()).

Clemens Ladisch helped me suggesting that I must use poll to wait for
events in different file descriptors. I need to be notified when audio
buffer has been recorded. I need to learn how to use ALSA in conjunction
with poll.

I'm a Linux developer beginner and I'm glad to use ALSA.

Thank you very much ;-)




[-- Attachment #2: Type: text/html, Size: 4258 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-07-27 14:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-27  9:28 Little question about ALSA callbacks Alfredo
2005-07-27  9:48 ` Takashi Iwai
2005-07-27 11:21   ` Alfredo
2005-07-27 10:05 ` Joern Seger
2005-07-27 14:30   ` Alfredo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.