[alsa-devel] External plugin question

Mina Almasry almasrymina at google.com
Fri Aug 7 02:02:47 CEST 2015


I'm new to alsa dev and I'm trying to write a very simple external pcm
plugin. I want my pcm plugin to output sound to multiple slave pcms when
sound is being writei'd to it. So:

snd_pcm_myplugin_writei(pcm, buffer, size) {
  foreach slave pcm {
    snd_pcm_writei(slave_pcm, buffer, size);
  }
}

I'm having trouble implementing this plugin because the external plugin sdk
does not allow me to define the writei function for my plugin, but lets me
define the transfer function which has a very different signature than
writei:

transfer(snd_pcm_ioplug_t *io, const snd_pcm_channel_area_t *areas,
snd_pcm_uframes_t offset, snd_pcm_uframes_t size)

how do I extract buffer and size from these arguments? Any tips on how I
write my plugin.

Mina


More information about the Alsa-devel mailing list