Hi,
My device is set audio input to “CD In” as a default value. I’d like to
change it to “Mic In”.
I’ve been looking at Audio Library document, but couldn’t find any good
example related to the issue.
From my understanding, I need to open and prepare the device for capturing
the data, correct?
int card = 0;
int dev =0;
snd_pcm_t *capture_handle;
if (snd_pcm_open (&capture_handle, card, dev,SND_PCM_OPEN_CAPTURE) < 0) {
printf (“cannot open audio device\n”);
exit (1);
}
int r = snd_pcm_channel_prepare(capture_handle,SND_PCM_CHANNEL_CAPTURE);
snd_pcm_channel_prepare call seem to return -3 which I don’t understand why?
In addition to, I don’t see any parameter in the API that will let me change
“CD In” to “Mic In”.
Any clue will be appreciated.
Thanks,
Soonthorn A.