按以下步骤解决:
1 下载alsa的开发包并安装 先查看内核中alsa driver版本:alsactl -v. 再到官方网站www.alsa-project.org/下载对应的开发包 开发包在ftp://ftp.alsa-project.org/pub/lib/ 解压后./configure make install直接就可以安装上
1 下载alsa的开发包并安装 先查看内核中alsa driver版本:alsactl -v. 再到官方网站www.alsa-project.org/下载对应的开发包 开发包在ftp://ftp.alsa-project.org/pub/lib/ 解压后./configure make install直接就可以安装上
2 重新编译qt库, ./configure -multimedia -v > out.txt configure完之后在文件out.txt中查看有无这一行字Alsa support ........... yes 如果为yes,则步骤1中的开发包装成功了的,如果为no,则步骤1可能有问题 楼主出现的问题是因为没有执行步骤1. 之后make make install都是一样的
测试
1.测试能否正常播放,使用命令
aplay test1.wav
test1.wav为已录制好的正常音频文件
2.测试能否正常录音,使用命令
arecord -d 10 -fdat test2.wav
-d表示录制时间为10秒,-fdat表示以dat质量进行录制(决定了采样率、声道等参数)
Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into /usr/local/Trolltech/Qt-4.8.5
To reconfigure, run 'make confclean' and 'configure'.