Generating random noise for fun in /dev/snd/
I think the reason this isn't working for you is because that interface has been deprecated. You normally can't write audio using /dev/dsp
anymore, at least without being tricky.
There is a program that will accomplish this for you on your system: padsp
.
This will map the /dev/audio
or /dev/dsp
file to the new Audio Server system.
Fire up the terminal and get into root mode with sudo su
.
Then, I'm going to cat /dev/urandom
and pipe the output into padsp
and use the tee
command to send the data to /dev/audio
. You'll get a ton of garbage in your terminal, so you may want to redirect to /dev/null
.
Once you're in superuser, try this command:
cat /dev/urandom | padsp tee /dev/audio > /dev/null
You may even want to try with other devices, like your mouse: Use: /dev/psaux
, for instance or the usb driver. You can even run your memory through it:
/dev/mem
Hope this clarifies why it wasn't working before.
Personally, I found the mouse and memory to be way more interesting than playing random static!
cat /dev/urandom | aplay
is the command that needs to be typed. If you aren't in "audio" group, you could prefix aplay with sudo. This also doesn't interfere with any daemons (I was running pulseaudio
while this command was active and correctly heard the "noise".
EDIT (Aug 6, 2019): In an older version of the command I also had a padsp tee
thing between the cat
and aplay
. Now that I'm actually working in the field I realise that it made absolutely no sense. Also, I know the updated command (the one visible now at the beginning of this answer) works because I use it several times a day at work.
Try /dev/audio or one of the other devices under /dev/snd. Not all of them are audio data sinks, you might have caught a mixer, microphone, or something