0

I want to beep through speakers. I'm using alsa through S/PDIF of ESI Julia. User is in the audio group.

ls /dev/snd
controlC0  midiC0D0  pcmC0D0c  pcmC0D0p  pcmC0D1c  pcmC0D1p  seq  timer

If I try beep -e /dev/snd/* - all devices return this:

ioctl: Inappropriate ioctl for device
ioctl: Inappropriate ioctl for device

I'm shure it's /dev/snd/pcmC0D1p that I need, it's the only one busy when music is playing.

1

The beep tool controls the PC speaker, i.e., the tiny speaker on the motherboard itself.

Other sound devices cannot be controlled by beep. You have to play some actual sound file, or synthesize the sound on the fly (try using the synth effect of sox).

  • Isn't beep -e [device] mean that I can use other devices besides motherboard's speaker? – user2777737 Jan 24 '14 at 10:51
  • That can be any device that supports the specific ioctl used to control the PC speaker. Only terminal devices connected to the console support this. – CL. Jan 24 '14 at 11:11
1

Freedesktop compatible desktop systems should have the following directory installed: /usr/share/sounds/freedesktop/. This directory should contain default sound files used by your desktop.

Now to emit sound from your speaks, you can use mplayer:

mplayer /usr/share/sounds/freedesktop/stereo/complete.oga

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.