LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-12-2011, 03:14 AM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,647

Rep: Reputation: 51
Making the signal at Line In to appear at Line Out.


Kernel 2.6.21.5, Slackware 12.0

Hi:
Assuming I work in a text console (tty1,...,tty6) and that I have audio at Line In (the jack at the machine rear panel), how could I do to have it at Line Out? Thanks.
 
Old 04-12-2011, 03:20 AM   #2
Walter.Stroebel
LQ Newbie
 
Registered: Apr 2011
Location: Arnhem, The Netherlands
Distribution: CentOS
Posts: 19

Rep: Reputation: 6
You could try

cat < /dev/dsp > /dev/dsp

Whether that works will depend on a lot of things like sound hardware having been detected properly, sample rates having been set and so on.

Perhaps sox will be of help to you.
http://sox.sourceforge.net/

Happy sound hacking,
Walter
 
1 members found this post helpful.
Old 04-12-2011, 03:25 AM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,647

Original Poster
Rep: Reputation: 51
Unbelievable! It works. Thanks a lot. But how could I do it with the alsamixer utility?
 
Old 04-12-2011, 03:30 AM   #4
Walter.Stroebel
LQ Newbie
 
Registered: Apr 2011
Location: Arnhem, The Netherlands
Distribution: CentOS
Posts: 19

Rep: Reputation: 6
You dont, that utility only sets audio levels for the various channels.
If you want to do any kind of audio processing (for example, add echo, enhance bass) you need to connect /dev/dsp as input and output with sox as the audio processor in between.
You should be able to install sox using either

apt-get install sox

or

yum install sox

(don't know slackware very well anymore -- download from the site otherwise)

Read about it on the site, audio manipulation requires some knowledge

Regards,
Walter
 
Old 04-12-2011, 03:48 AM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,647

Original Poster
Rep: Reputation: 51
I have sox. It comes with my distribution. I'll study the manuals. I know that to do a recording I can proceed like this:

amixer -c 0 sset Line,0 100%,100% mute capt
amixer -c 0 sset PCM,0 100%,100% unmute nocap
arecord -f CD -D plughw:0,0 > myaudiofile.wav

Perhaps replacing '> myaudiofile.wav' by '> /dev/dsp' will work?

Thanks for your reply. Enrique.
 
Old 04-12-2011, 03:56 AM   #6
Walter.Stroebel
LQ Newbie
 
Registered: Apr 2011
Location: Arnhem, The Netherlands
Distribution: CentOS
Posts: 19

Rep: Reputation: 6
Ah, you said alsaMIXER ... arecord is another utility
Yes, probably replacing that will work fine, go ahead and try it.

Hint: if you get stuck on a prompt Ctrl-\ (control back-slash) will probably stop it. Else open another console and kill -9 the stuck program.

Regards,
Walter
 
1 members found this post helpful.
Old 04-12-2011, 04:03 AM   #7
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,647

Original Poster
Rep: Reputation: 51
Thanks a lot, Walter.

Regards, Enrique
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Copy and replacing specific line from file1 to file2 line by line vjramana Programming 10 03-28-2011 08:49 AM
access a file line by line, and check the length of each line. ddebbie90 Programming 1 02-13-2011 03:31 PM
C++ text file line by line/each line to string/array Dimitris Programming 15 03-11-2008 09:22 AM
php - Read file line by line and change a specific line. anrea Programming 2 01-28-2007 02:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:10 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration