LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 07-22-2009, 06:29 AM   #1
girish_hilage
Member
 
Registered: Oct 2003
Posts: 78

Rep: Reputation: 15
reading and writing to /dev/dsp


Hi,
I am running a .mp3 file using 'xine' without any issues on my Fedora Core 8 machine.

I am reading /dev/dsp and storing it in some file.
i.e. cat /dev/dsp > musicfile

Now I am stopping 'xine' and then writing 'musicfile' to /dev/dsp.
i.e. cat musicfile > /dev/dsp

In this case I can hear the music but with a lot of noise in it.
Is there any way I can remove/reduce this noise from 'musicfile'?

Regards,
Girish
 
Old 07-23-2009, 07:23 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Please explain what you are trying to accomplish.
Recording from /dev/dsp defaults to 8-bit unsigned data, mono and 8 kHz sampling so you are not going to get the same quality as the MP3 source. Make sure all other sound outputs except for the PCM channel are muted or at min levels.
 
Old 07-24-2009, 03:21 PM   #3
MrUmunhum
Member
 
Registered: May 2006
Location: Mt Umunhum, CA, USA, Earth
Distribution: Debian/ Fedora/ Ubuntu/ Raspbian
Posts: 549

Rep: Reputation: 40
Quote:
Originally Posted by girish_hilage View Post
Hi,
I am running a .mp3 file using 'xine' without any issues on my Fedora Core 8 machine.

I am reading /dev/dsp and storing it in some file.
i.e. cat /dev/dsp > musicfile

Now I am stopping 'xine' and then writing 'musicfile' to /dev/dsp.
i.e. cat musicfile > /dev/dsp

In this case I can hear the music but with a lot of noise in it.
Is there any way I can remove/reduce this noise from 'musicfile'?

Regards,
Girish
Install alsa and alsa-util. Then use arecord and aplay.

Try 'yum list \*alsa\*'.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
no /dev/dsp nor /dev/mixer on 2.6.9 amuro_ray Slackware 9 08-03-2009 02:54 PM
/dev/audio, /dev/dsp and /dev/mixer missing in Debian Etch 1337_penguin Debian 2 04-11-2007 11:33 AM
devfs and devfsd don't create /dev/dsp or /dev/sound/dsp ? behmjose Linux - Hardware 2 10-02-2006 12:27 PM
Could not open device "/dev/dsp" for writing bhomass Debian 7 11-16-2005 03:04 PM
No /dev/dsp /dev/mixer etc david.skinner Linux - Software 2 05-19-2005 02:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:31 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
Open Source Consulting | Domain Registration