andrewrk / libsoundio

C library for cross-platform real-time audio input and output
http://libsound.io/
MIT License
1.92k stars 229 forks source link

How to access ALSA Plugin cards #212

Open sywtng opened 5 years ago

sywtng commented 5 years ago

I want to run soundio on an embedded board, but sio_list_device can't probe and open hw:0,0 card, because the actual card 0 is used by alsa plugin. How to access alsa plugin card by soundio?

#cat /etc/asound.conf
pcm.!default
{
    type asym
    playback.pcm {
    ¦   type plug
    ¦   slave.pcm "hw:0,0"
    }   
    capture.pcm {
    ¦   type plug
    ¦   slave {
    ¦   ¦   pcm "hw:0,0"
    ¦   }   
    }   
}