On Wed, 1 May 2002, Paul Davis wrote:

> >A solution could be alter libasound to support non-kernel drivers. Or use
> >a loopback device in the kernel.
>
> libasound *does* support non-kernel drivers. when you access
>
>         snd_{pcm,rawmidi}_foo (handle, ...)
>
> what you're actually doing is:
>
>      1) check the device type of handle
>      2) use snd_pcm_TYPE_foo (handle, ...)
>
> this is not done for every call - instead, when you open the handle,
> the relevant function pointers are set up.
>
> for example:
>
>     snd_pcm_open (&handle, "hw:0,0", ...)
>
> sets up the set of function pointers to use:
>
>      snd_pcm_hw_read
>      snd_pcm_hw_write
>      snd_pcm_hw_prepare
>      snd_pcm_hw_status
>
> etc.
>
> you can define a new device type in ~/.asoundrc that names specific
> functions to be used for each part of the API. then you just add the
> .so that contains the functions, and you're all set.

This looks nice. Do rawmidi ports created this way appear as sequencer
clients as well?

-- 
Manush


_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to