We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,949 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Ubuntu - writing raw data to /dev/dsp

The following is an exercise for my class:
Redirect mouse device into a file.

sudo cat /dev/input/mice > rawmouse.data
Move the mouse a bit and then type CONTROL-C.

Note that on some distro's you'll need to sudo to bypass device files' restricted permissions.

Now, cat that file to the sound card.

cat rawmouse.data > /dev/dsp
Sounds horrible, doesn't it.

So that's how we make sound, by throwing bytes at the sound card.

I follow those directions, but it remains silent.. Any ideas why?

Note: I am running Ubuntu 10.10, and my sound is at max volume.

1
Contributor
3
Replies
5 Days
Discussion Span
2 Years Ago
Last Updated
4
Views
LanguidLegend
Newbie Poster
9 posts since Apr 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

[bump]

LanguidLegend
Newbie Poster
9 posts since Apr 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Any help would be awesome! :(

LanguidLegend
Newbie Poster
9 posts since Apr 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Update:
Well I've done soem more digging, and I've found out that /dev/dsp is based on the OSS (Open Sound System), which Ubuntu doesn't use anymore. Ubuntu now uses ALSA (Advanced Linux Sound Architecture), which has a different setup (no idea what).
Based on that, I came across a directory which might contain my solution(?): /proc/asound

Any ideas? Am I heading in the right direction??
I just need to find some way to do this exercise (writing raw text data for output) on my system..

LanguidLegend
Newbie Poster
9 posts since Apr 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0603 seconds using 2.64MB