1

Using Raspbian Jessie, when I try to output a short beep sound (approx 0.5s) through HDMI, the sound is somehow distorted. The first few 100ms of the audio is not played, or the audio is played too fast, or both. Sometimes it makes no sound at all.

Symptoms can be reproduced with a sample WAV file:

omxplayer -o hdmi /usr/share/sounds/alsa/Front_Center.wav

When I try with a long MP3 it works fine. When I add silence to the start and end of the beep file it also plays normally. Unfortunately the sound needs to be instant and short (as a touchscreen "tap" notification).

What's causing this, and is there a fix?

Edit: I also tried playing the beep through a web audio component using chromium-browser. The first beep is ignored, subsequent beeps seem to work fine. After a few minutes of no activity its silent again. Is an HDMI audio channel closing/opening somehow? Can I force it to remain open?

1

I managed to circumvent the HDMI audio sleep by generating a silent output. In my case I used the HTML5 Audio API to play a looping silence in the background, and layer my actual sounds over the top. Now my interaction sounds play instantly every time.

It doesn't really solve the original problem so if anyone has a better answer I'd love to hear it. I believe the HDMI sleep is caused by ALSA somehow.

  • Yeah, I'm searching as well. I use my box for making music and this problem happens on every note played on my midi controller while composing when I didnt play another note directly before. So I need to play every note twice before I can actually hear how it sounds. Really annoying. – Marcel Bankmann Dec 22 '17 at 11:48

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.