From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Alfredo" Subject: ALSA and event notification schemas Date: Mon, 25 Jul 2005 19:09:14 +0200 Message-ID: <0416c7e824e16a44987863eda70d4199@vida-software.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_15724_00019169.00026500" Return-path: Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: "alsa-devel@lists.sourceforge.net" List-Id: alsa-devel@alsa-project.org ------_=_NextPart_15724_00019169.00026500 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, I'm involved in a development project consisting of a multimedia/networked component using event driven model in a C++ Linux environment (1 thread than manages all the events using an event loop). The events that the component must handle are: 1. Sockets events. 2. Timer events. 3. Audio events ( event =3D when the next buffer is filled with audio from the user, notify the component. Then the component will transfer the audio buffer using a udp socket to another distributed component). 4. Key press and release events (Push To Talk key) What is the best way to handle all this events in a Linux environment? I have found that libevent is a very interesting library: http://www.monkey.org/~provos/libevent/ "The libevent API provides a mechanism to execute a callback function when a specific event occurs on a file descriptor or after a timeout has been reached". This resolves the sockets and timer events. I'm not sure if this approach works well with ALSA (for audio events). I have read that ALSA provides asynch IO (and callbacks mechanishm), but I don't know if it fits well with libevent approach. Is there any way use ALSA to handle audio events (like buffer is filled with audio from the microphone) and handle the rest of the events in the same process in a Linux environment? Another question: Does ALSA support AMR or GSM codecs? Your help is really very apreciated. ------_=_NextPart_15724_00019169.00026500 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello, I'm involved in a development project consisting of a multimedia/networked component using event driven model in = a C++ Linux environment (1 thread than manages all the events using an event loop).

 

The events that the component must handle are:

1. Sockets events.

2. Timer events.

3. Audio events ( event =3D when the next buffer = is filled with audio from the user, notify the component. Then the component w= ill transfer the audio buffer using a udp socket to another distributed compone= nt).

4. Key press and release events (Push To Talk key= )

 

What is the best way to handle all this events in= a Linux environment?

I have found that libevent is a very interesting library: http://www.monkey.org/~provos/libevent/

"The libevent API provides a mechanism to ex= ecute a callback function when a specific event occurs on a file descriptor or af= ter a timeout has been reached".

This resolves the sockets and timer events. I'm n= ot sure if this approach works well with ALSA (for audio events). I have read = that ALSA provides asynch IO (and callbacks mechanishm), but I don't know if it = fits well with libevent approach.

Is there any way use ALSA to handle audio events (like buffer is filled with audio from the microphone) and handle the rest = of the events in the same process in a Linux environment?

 

Another question: Does ALSA support AMR or GSM codecs?

 

Your help is really very apreciated.

------_=_NextPart_15724_00019169.00026500-- ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click