LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 05-07-2010, 10:34 PM   #1
fang2415
Member
 
Registered: Jan 2007
Posts: 156

Rep: Reputation: 15
Getting sound to application from sound card line-in/microphone


Okay, after about a full workday of Googling for what I thought would be a simple task, it's time to pull over and ask for directions:

I'm trying to use an application (e.g., mplayer) to play sound that comes in my sound card (via the mic jack). (What I'm really trying to do is sync a sports broadcast by putting a delay on AM audio, as described here. I'm stuck at the part where it says "this shouldn't be too difficult".)

I've seen some hints that there might be code-heavy solutions using LADSPA or some JACK SDK, but there's just gotta be a simpler way. I'm hoping for something like
Code:
mplayer -delay -7 - < /dev/mic
but I'm darned if I can find it.

Can anybody see what I'm missing? I'm sure there are plenty of other sports fans who would find this useful for syncing radio with the digital TV feed...
 
Old 05-08-2010, 06:02 PM   #2
speck
Member
 
Registered: Nov 2001
Location: California
Distribution: Slackware 14.1
Posts: 271

Rep: Reputation: 54
It would probably work with something like the following (if you're using ALSA):

arecord | xargs mplayer -delay -7 -

You could use most any command line recording application (other than arecord) in a similar way.
 
Old 05-11-2010, 07:44 PM   #3
fang2415
Member
 
Registered: Jan 2007
Posts: 156

Original Poster
Rep: Reputation: 15
Sorry, hadn't had a chance to test this until now.

xargs doesn't seem to work -- I'm assuming because it passes the sound data to mplayer as a command line option (I get a lot of errors about unknown options on the command line).

This got me thinking though, and I got it working with the following:
[code]arecord | vlc -[\code]
...at which point I exclaimed "duh". I think I had already tried "arecord | mplayer -" but it gave me a bunch of seeking errors for some reason.

Looking pretty good! Now I just need to figure out the most convenient way to delay the sound in vlc...

Thanks for the tip!

Last edited by fang2415; 05-11-2010 at 07:46 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microphone Working, Sound playing back, Sound Not Recording (Gentoo 2.6.29) kingzog Linux - Software 3 04-23-2009 09:09 PM
CD PLAYER SOUND CARD LINE-IN, then output sound to speaker out of compuer scrollups Linux - Hardware 2 06-07-2006 10:29 PM
no sound from sound blaster PCI sound card using mandrake-linux 10.1 box nila56 Linux - Hardware 2 05-29-2006 02:48 PM
Sound card line-in jrcreasy Linux - Newbie 19 11-29-2005 03:50 PM
Poor sound from microphone with Asrock onboard sound Melon Mandriva 0 11-13-2004 04:19 AM


All times are GMT -5. The time now is 05:22 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration