How to build a test environment for audio DSP code in C using GNU/Linux
This may be useful for people that want to try audio DSP algorithms in C.
You will need:
- Hardware: You will need regular a PC (not older than a Pentium 3) or small PC will do the job.
- Sound card: This PC should have a soundcard, at least with one mic input and one headphones output.
- I/O: You will need, speakers or headphones and a microphone, or some cable the connect the source of the sound to the PC that will be doing the audio processing.
- Software: You will need a GNU/Linux distribution with at least OSS (Open Sound System) audio driver and GCC compiler.
The Open Sound System is one of the the first Linux driver built, and like other devices like Ethernet and serial ports, it has a well defined API and abstraction models of different audio devices like soundcards, DSPs, synthesizers, MIDI devices, etc. You can download the OSS programming guide at http://www.opensound.com/pguide/oss.pdf
I use the Fedora Core 6 distribution because I am using old PCs to this (a 7 years old PC and a 5 years old PC).
You will require also some Linux basic skills like browsing directories, compiling with GCC and so on. It would be better if you know how to install the Linux distribution, if you don’t know how to do it, there are plenty of HOWTOs guides in the web.
Once you have everything installed, the next thing you do is setting the soundcard. In the OS desktop you can do this by setting the mic input for recording, and also set the capture option.
When you have the soundcard configured then you can copy the code listed at http://www.dsprelated.com/showcode/78.php and create a .c file with it, and compile it with GCC, there should not be any problem.
Then run the compiled program and you should be able to connect an audio signal in the mic input and hear that signal in the headphones or speakers output of the PC.
To post reply to a comment, click on the 'reply' button attached to each comment. To post a new comment (not a reply to a comment) check out the 'Write a Comment' tab at the top of the comments.
Registering will allow you to participate to the forums on ALL the related sites and give you access to all pdf downloads.