ALSA program for capture and play audio file

Hi All,

I am new to sound programming for ALSA. I want to Write a program that
simultaneously can capture and play an audio file with the help of
threads and use buffer to store the data while recording and can
simultaneously take data from buffer and play in external device.

So please help me to overcome this problem.

Rgds,
Rakesh

rakesh kumar wrote:

Hi All,

I am new to sound programming for ALSA. I want to Write a program that
simultaneously can capture and play an audio file with the help of
threads and use buffer to store the data while recording and can
simultaneously take data from buffer and play in external device.

So please help me to overcome this problem.

http://www.google.com/search?q=alsa+tutorial

This [1] was the most useful site I found. I was able to get audio
through working, that is pulling audio in a buffer at a time and
sending it out again. My code is here [2]. Lab a takes audio in and
stores it in a file. Lab b read the file from lab a and play it. Lab
c does the audio through. Lab d passing the audio in to a routine for
processing and then sends it out.

If you are set up for c6run, Lab d will do the processing on the DSP.

Enjoy...

--Mark

[1] http://www.suse.de/~mana/alsa090_howto.html#sect02
[2] http://www.rose-hulman.edu/~yoder/Beagle/AudioThru.tar.bz2

Hi Mark, you just did his school project for him and you didnt even
get paid :wink:

djlewis

Oops! Well, he needs to build on what I've done!

Rakesh:
  What are you doing with alsa on the Beagle?

--Mark

Probably for listening to a live cricket match :wink:

Thank you,
Johnson

Stumbled upon this thread while trying to write an ALSA audio envelope to run on a BeagleBone Black.

Mark do you have a valid link for your work? This has gone the way of the 404… http://www.rose-hulman.edu/~yoder/Beagle/AudioThru.tar.bz2

They have been moved to github. They are here[1] now. Let me know if they still work, I haven’t messed with them recently.

–Mark

[1] https://github.com/MarkAYoder/BeagleBoard-exercises/tree/master/audioThru

Thanks Mark!
Is Lab c just part of Lab d now?

From awhile back you said:
" Lab a takes audio in and stores it in a file. Lab b read the file from lab a and play it. Lab c does the audio through. Lab d passing the audio in to a routine for processing and then sends it out. "

Your GitHub just has a,b and d…

Oops, I should have pointed you to the solution. Check out [1], I think all the audio code is there.

–Mark

[1] https://github.com/MarkAYoder/BeagleBoard-exercises-solutions/tree/master/audioThru