jyhong836 / LinuxSound

Poroccess the sound devices in Linux System.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LinuxSound

This respository is aimed to read and write data to sound card. There are two way to make this. The first one is DSP, which is used by me at my Ubuntu 10.04 Virtualbox. Another one is ALSA, which is a newer Sound Card library.

DSP

Porocess the audio in Linux System. The DSP device in Linux has been used to do this. To compile it, you can run make in the code folder (alsa and dsp) to compile them. Before you run it, please check if the device /dev/dsp exist.

Features

  • create wav sound file according coded math rules
  • play the wav file, and show the messages.

Reference

ALSA

Process the audio in Linux System, where the libasound is installed. In Debian, you can install the neccessary lib with apt-get install libasound2-dev, and you may also want the doc, apt-get install libasound2-doc, which is in html format.

I have applied this part code in my Raspberry Pi with a USB card. I have use the GPU of raspberry pi to speed up the fft proccess. The fft code in alsa/fft/ is created by Andrew Holme, which is included in raspbian system /opt/vc/src/hello_pi/hello_fft.

Features

  • read float data from the audio capture.
  • use Andrew Holme's code to speed up my fft proccess with GPU.

About FFT in Raspberry Pi

You can read my introduction to FFT with GPU in Rasp-Pi by visiting my blog page, raspberry pi use GPU to do FFT in Chinese, or Eben Upton's post Accelerating Fourier transforms using the GPU in English.

You can run the program in alsa/ with command ./SoundADMain in bash, the help message will be printed.

Reference

About

Poroccess the sound devices in Linux System.

License:GNU General Public License v2.0


Languages

Language:C++ 54.7%Language:C 39.4%Language:Objective-C 3.9%Language:Makefile 2.0%