Capture program is a minimal example that uses ALSA APIs to read from audio driver and record for us. It is not intended to be used as a real program.
Follow this link and save source code as *.c. E.g: "capture.c"
To make our cross-compilation to our source code we must specify where ALSA libraries are in SDK's directory. If you are using RidgeRun's SDK type the following on terminal:
#arm-linux-gnueabi-gcc -I $DEVDIR/fs/fsdev/usr/include -o capture capture.c -lasound -L $DEVDIR/fs/fsdev/usr/lib compiler location of ALSA includes object source location of ALSA libraries
This command is meant to be done on the same directory where your source code is. $DEVDIR refers to the SDK's install directory.
If arm-linux-gnueabi-gcc is not recognized as an executable command is because you haven't exported compilers path. To do so type
Now it's time to test it! Just type the title of the file you want to record in the following command.
#./capture > file_name