LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-08-2010, 03:49 AM   #1
mrdebug
LQ Newbie
 
Registered: Jul 2010
Posts: 2

Rep: Reputation: 0
Alsa programming. Record from mic.


In order to record from mic I have compiled this example:
http://www.linuxjournal.com/article/6735?page=0,2
But does not work on Debian Lenny. Nothing has come to record.
The capture interface is set correctly because skype works well.
Have you got an example for record from mic?
 
Old 07-08-2010, 06:28 AM   #2
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 493

Rep: Reputation: 50
Be aware that alsa is "just" the lowest level of the linux sound stack. Nowadays, most distributions use a sound-server which is between alsa and the applications. The two main sound servers are "jack" (for "serious" sound users) and "pulseaudio" (for standard users). So maybe you can't directly use alsa while the sound-server is running (like any critical resource)?
Another possibility could be that the user running your application don't have the right to open/read/write any alsa device. Run it as "root", or better add the user to the alsa group (maybe sound or audio group, depends on the linux flavor)
 
Old 07-08-2010, 08:42 AM   #3
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by jf.argentino View Post
Be aware that alsa is "just" the lowest level of the linux sound stack. Nowadays, most distributions use a sound-server which is between alsa and the applications. The two main sound servers are "jack" (for "serious" sound users) and "pulseaudio" (for standard users). So maybe you can't directly use alsa while the sound-server is running (like any critical resource)?
Another possibility could be that the user running your application don't have the right to open/read/write any alsa device. Run it as "root", or better add the user to the alsa group (maybe sound or audio group, depends on the linux flavor)
I would first try to use the stock 'arecord'. An yes, I would reconfigure the sound system not to use any sound server.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! I can't record line-in/mic on ALSA cs46xx! akp913 Debian 22 03-01-2009 07:30 AM
Can't record from Mic sabre307 Linux - Hardware 10 05-27-2006 06:06 PM
how to record from mic ginda Linux - Newbie 1 05-24-2006 02:57 AM
Unable to record mic-in with SoundBlaster Live! while able to record other sources max76230 Linux - Newbie 2 03-14-2005 04:31 AM
SB Live! cannot record from mic german Linux - Hardware 5 12-27-2004 05:27 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration