Resources for “Introduction to Sound Programming with ALSA”
October 1st, 2004 by Jeff Tranter in
ALSA Project: www.alsa-project.org
Alternate Sound APIs:
aRts and CSL: www.arts-project.org
JACK: jackit.sourceforge.net
OpenAL: www.openal.org/home
SDL: www.libsdl.org
Sound and MIDI Software for Linux: linux-sound.org
Special Magazine Offer -- 2 Free Trial Issues!
Receive 2 free trial issues of Linux Journal as well as instant online access to current and past issues. There's NO RISK and NO OBLIGATION to buy. CLICK HERE for offer
Linux Journal: delivering readers the advice and inspiration they need to get the most out of their Linux systems since 1994.
Sorry, offer available in the US only. International orders, click here.
Subscribe now!
Recently Popular
| The new business of free radio | Jul-24-08 |
| Linux HOWTO: Video Editing Magic with ffmpeg | Jul-23-08 |
| Why We Must React to ACTA | Jul-24-08 |
| Boot with GRUB | May-01-01 |
| Chapter 16: Ubuntu and Your iPod | Aug-30-06 |
| Building a Call Center with LTSP and Soft Phones | Aug-25-05 |
Featured Videos
Non-linear video editing tools are great, but they're not always the best tool for the job. This is where a powerful tool like ffmpeg becomes useful. This tutorial by Elliot Isaacson covers the basics of transcoding video, as well as more advanced tricks like creating animations, screen captures, and slow motion effects.
Shawn Powers reviews the HP Mini-Note portable computer.
Thanks to our sponsor: Silicon Mechanics
Silicon Mechanics is a leading manufacturer of rackmount servers, storage, and high performance computing hardware. The best warranty offerings available are backed by experts dedicated to customer satisfaction.
From the Magazine
August 2008, #172
There's nuttin like a Cool Project to give you some relief from the summer heat, so get out your parka cuz we got a bunch of em. First up is the BUG, not a bug, The BUG. It's got a GPS, camera and more, in a hand-sized package that's user programmable. The BUG does everything. It's both a floor wax and a dessert topping. Get one now. Need a software version of a Swiss Army knife? Take a look at Billix, and don't leave home without it. Then, chew on this one, an X server on a Gumstix device driving an E-Ink display. Need more storage? How about 16 Terabytes? Can do.
And, of course, we have the usual cast of characters: Marcel, Reuven, Dave, Kyle, Doc, plus the new kid on the block Shawn Powers. But it doesn't stop there: build a MythTV box on a budget, build your own GIS system, set up the tools to monitor your enterprise and more. Finally, remember The War of the Worlds? Now you can play too.
Delicious
Digg
Reddit
Newsvine
Technorati







do u know how to solve this e
On March 31st, 2005 hardik (not verified) says:
do u know how to solve this error i got the same error
plz tell me how to link the programme with alsa library
hardik
simple capture program doesn't record nothing...
On February 14th, 2005 Marco Antonio Lopez Trinidad (not verified) says:
I typed the simple playing program and I made some tests, it works almost with no problems.
However, this is not the case for the simple capture program. It is typed like the article says, I compiled and no errors, but the file where the result is redirected has in appearence not information. I played the content of this file with the simple playing. I have tried with different inputs, the CD and the MIC on the KMix interface without many success. The same happens with the 6735l4.c file, there is any idea???
The version of the ALSA API is 1.0.8rc2.
thanx,
--marco.
Am I missing something?
On November 30th, 2004 Geoff (not verified) says:
I expected to find the listings from the article, transcribed for compillation by the lazy. But no?
problems compiling listing 1
On October 14th, 2004 Anonymous says:
I get this when I try to run listing 1. I am using alsa version 1.0.6
Do I need to link something?
> /tmp/ccY117TW.o(.text+0x47): In function `main':
> : undefined reference to `snd_pcm_stream_name'
> /tmp/ccY117TW.o(.text+0x84): In function `main':
> : undefined reference to `snd_pcm_access_name'
> /tmp/ccY117TW.o(.text+0xc1): In function `main':
> : undefined reference to `snd_pcm_format_name'
> /tmp/ccY117TW.o(.text+0xd0): In function `main':
> : undefined reference to `snd_pcm_format_description'
> /tmp/ccY117TW.o(.text+0xdd): In function `main':
> : undefined reference to `snd_pcm_format_name'
> /tmp/ccY117TW.o(.text+0x11e): In function `main':
> : undefined reference to `snd_pcm_subformat_description'
> /tmp/ccY117TW.o(.text+0x12b): In function `main':
> : undefined reference to `snd_pcm_subformat_name'
> /tmp/ccY117TW.o(.text+0x16c): In function `main':
Re: problems compiling listing 1
On October 15th, 2004 Anonymous says:
use -lasound
Re: Resources for Introduction to Sound Programming with ALSA
On September 6th, 2004 Anonymous says:
I am using ALSA version 1.6a and seem to be having problems with listing2,3 and 4. I keep getting the error "unable to set hw parameters: Invalid argument -22" I added the -22 by printing the rc value. The error is caused by the snd_pcm_hw_params( handle, params) call to write the parameters to the driver. I looked at the ALSA documentation and can't seem to find a breakdown of the params struct. It would help if I knew what parameter are bad.
Re: Resources for Introduction to Sound Programming with ALSA
On September 27th, 2004 Anonymous says:
the variable dir needs to be initialized to 0. This will make at least listing 2 work. I suspect that it will make listings 3 and 4 work as well.
d!
Re: Resources for Introduction to Sound Programming with ALSA
On September 20th, 2004 Anonymous says:
I have a similar problem, with listing four only. It seems that may Soundblaster live does not accept a sampling rate of 44100. However, a smpling rate of 88200 is accepted. (I have not got any sound yet, but that may be due to other things.)
Re: Resources for Introduction to Sound Programming with ALSA
On September 7th, 2004 Anonymous says:
I'm struggling with the same problem.
Help!
Philip