|
RK3288板子的音频设备号该怎么设置?求教各位大神
发表于 2015-4-4 19:30:44
浏览:6988
|
回复:0
打印
只看该作者
[复制链接]
楼主
在音频开发过程中碰到了如下问题:
在调用alsa音频库的过程中,需要设置音频的设备号,但我根据ALSA的说明文档去设置,尝试了所有的设备号还是不能正常的录音:
设置device参数时:
snd_pcm_open(&handle,device,SND_PCM_STREAM_CAPTURE, 0);
device设置为default时,录制的音频为单一频率的声音
device设置为hw时,录制的音频为空的语音。
请问这个问题该怎么设置呢,从你们的技术文档上也没找到相应的答案。
求教各路大神
下面是wiki上alsa音频库的说明:
default
This is the recommended device name for most applications. The default device will usually use Pulseaudio or dmix (TODO: confirm that dmix really is used also for capture), which ensures that your application won't prevent other audio applications from working at the same time, in case the hardware doesn't support multiple simultaneous capture streams.
hw
This is always available if the hardware supports capture at all, but the semantics are not defined, so avoid using this for other things than mono input. This should also be fine if you only target specific hardware that you know for sure how it behaves when using the "hw" device name.
|
|