I'm trying to create a beeping sound to be played on my speakers from the shell.
I can easily accomplish this using aplay, but, it takes a second or so before it actually plays.
I need to have it practically instant, as I'm using it in a (headless) shell script to play a sound on a keypress. Using aplay the beep comes way too late.
I'm thinking to write something directly to a /dev sound device or something, but haven't been successful with this yet.
I'm using a Odroid-W (Raspberry Pi-clone), and have heard that, at least on the Pi, the audio jack is actually wired to two PWM GPIO pins (40, 45), writing to these pins directly however yields only silence.
It doesn't need to be a fancy sound, any buzz or beep will do.
(if all fails then I'll probably wire a GPIO pin to a makeshift mixer and connect that to the amp.)
BEL
character which should produce a beep assuming that terminal feature is enabled and connected to some sound producing something... – thrig Apr 17 '17 at 18:36https://en.wikipedia.org/wiki/Bell_character
– svenema Apr 17 '17 at 19:17aplay
I suppose suggests Linux with ALSA? – tripleee Apr 17 '17 at 19:23about the latency.. I feel that the startup time for the aplay utility is the issue here, not really audio latency.. feel free to correct me here ;-)
– svenema Apr 17 '17 at 19:41