Re: [linux-audio-dev] alsa sequencer filter client

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] alsa sequencer filter client
From: Matthias Nagorni (mana_AT_suse.de)
Date: Tue Jan 27 2004 - 12:02:25 EET


On Mon, 26 Jan 2004, Garett Shulman wrote:

> Matthias Nagorni wrote:
>
> > On Sun, 25 Jan 2004, Garett Shulman wrote:
> >
> >
> > > Hello, I am trying to create a very simple midi filter client for the alsa
> > > sequencer based on aseqview-0.1.4. I have alsa 0.9.8. This code shows the
> > >
> >
> > Maybe you can base it on my MIDI router example in
> > http://www.suse.de/~mana/alsa090_howto.html
> >
> > A QT MIDI router which you could take as example code is located at
> > ftp://ftp.suse.com/pub/people/mana/qmidiroute-0.0.2.tar.bz2
> >
> > Matthias
> >
> >
> Matthias, Thank you for the suggestion. Your howto is exactly the information
> I need. Very nice. The code I was working with before is callback based. Do
> you have any opinion about callback vs. polling in regards to the alsa
> sequender? Do you think I will get less overhead if I use bits of the code in
> your howto in the callback framework? Thanks. -Garett

Discussed this briefly with Takashi (author of ALSA sequencer). Currently
there is no wrapper library implemented, so the polling method I use in my
MIDI examples is the only way to handle the asynchronous MIDI events.
If you want, you can regard the "midi_route" function as callback
function. You could even write a wrapper function yourself which has a
function pointer as argument, the while(1) { poll (... } as body and will
call its argument function whenever poll returns, indicating that a new
MIDI event is available for read.

Matthias

-- 
Dr. Matthias Nagorni
SuSE Linux AG
Maxfeldstr. 5             phone: +49 911 74053375
D - 90409 Nuernberg       fax  : +49 911 74053483


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Jan 27 2004 - 12:06:20 EET