我想在覆盆子pi中录制声音,所以我想知道如何做到这一点 [英] I want to record the sound in raspberry pi, so I want to know how to do that

查看:95
本文介绍了我想在覆盆子pi中录制声音,所以我想知道如何做到这一点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用mosfet制作麦克风,然后使用我制作的内容录制声音。

我已经成功录制语音以使用覆盆子pi提供的'alsa'。



但是当我使用'alsa'时,我每次都在内核模式下编写代码,例如

'arecord -D plughw:CARD = 1, DEV = 0 -d 3 -f S16_LE -d 5 -r 44100 test.wav'。



此外我想与我拥有的其他代码合并,所以我需要知道如何用C编码录制麦克风声音。



是否有任何代码或网站推荐给我???



我尝试了什么:



请原谅我的短英语技巧,如果你难以理解的话。

解决方案

arecord 是使用Alsa库的小型命令行实用程序。所以你可以使用 aplay.c 源为你的程序添加类似的功能(只有 aplay 实用程序和源代码; arecord 只是 aplay 的符号链接。



您可以在 alsa-utils 来源http://www.alsa-project.org/main/index.php/Download\">下载 - AlsaProject [ ^ ]。有关 aplay.c 源的快速浏览,请参阅 alsa-utils: aplay / aplay.c源文件 - doxygen文档| Fossies Dox [ ^ ]。

I make the microphone with mosfet, then i record the sound with using what i make.
And already i success to record my voice to use the 'alsa' serviced by raspberry pi.

But when i used the 'alsa', i write the code everytime in kernel mode like
'arecord -D plughw:CARD=1,DEV=0 -d 3 -f S16_LE -d 5 -r 44100 test.wav'.

Also I want to merge with another code i have, So i need to know how to record the microphone sound in C coding.

Is there any code or site recommend for me ???

What I have tried:

please excuse my short english skill, if you hard to understand.

解决方案

arecord is a small command line utility using the Alsa library. So you might use the aplay.c source to add similar functionality to your program (there is only the aplay utility and source; arecord is just a symlink to aplay).

You can download the alsa-utils sources at Download - AlsaProject[^]. For a quick view on the aplay.c source see alsa-utils: aplay/aplay.c Source File - doxygen documentation | Fossies Dox[^].


这篇关于我想在覆盆子pi中录制声音,所以我想知道如何做到这一点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆