Click here to Skip to main content
15,886,801 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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.
Posted
Updated 20-Nov-16 7:07am

1 solution

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[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900