ALSA program for capture and play audio file

832 views
Skip to first unread message

rakesh kumar

unread,
Jun 21, 2011, 7:46:37 AM6/21/11
to Beagle Board
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

Vladimir Pantelic

unread,
Jun 21, 2011, 9:12:45 AM6/21/11
to beagl...@googlegroups.com

Mark A. Yoder

unread,
Jun 21, 2011, 2:17:51 PM6/21/11
to Beagle Board
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

djlewis

unread,
Jun 22, 2011, 1:00:04 PM6/22/11
to Beagle Board
Hi Mark, you just did his school project for him and you didnt even
get paid ;)

djlewis
---------

Mark A. Yoder

unread,
Jun 22, 2011, 1:27:23 PM6/22/11
to Beagle Board
Oops! Well, he needs to build on what I've done!

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

--Mark

Johnson Mathew Easow

unread,
Jun 22, 2011, 1:34:07 PM6/22/11
to beagl...@googlegroups.com
Probably for listening to a live cricket match ;-)

Thank you,
Johnson

> --
> You received this message because you are subscribed to the Google Groups "Beagle Board" group.
> To post to this group, send email to beagl...@googlegroups.com.
> To unsubscribe from this group, send email to beagleboard...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/beagleboard?hl=en.
>
>

Jesse Forgues

unread,
Jul 31, 2014, 8:35:25 PM7/31/14
to beagl...@googlegroups.com
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

Mark A. Yoder

unread,
Aug 6, 2014, 11:55:04 AM8/6/14
to beagl...@googlegroups.com
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

Jesse Cobra

unread,
Aug 6, 2014, 1:53:38 PM8/6/14
to beagl...@googlegroups.com
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...


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark A. Yoder

unread,
Aug 6, 2014, 2:01:10 PM8/6/14
to beagl...@googlegroups.com
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 
Reply all
Reply to author
Forward
0 new messages