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.)