pHAT DAC Produces No Sound for Certain Audio Files

I’m running Raspbian Stretch (release 9.8) on a Raspberry Pi 3, and have learned that my pHAT DAC won’t produce sound for certain audio files.

All of my .mp3 files, which I bought and downloaded from Amazon, play fine. However, most of my .wav files, which were recorded using my computer, generally don’t produce sound. This means that I can open the file with VLC, and see that time is running, but I hear no sound.

The problem definitely has something to do with the audio files, since I can make a playlist, using VLC, and certain songs will produce sound, while others won’t.

This same thing happens when I use my Raspberry Pi with OpenELEC and LibreELEC, on the same hardware.

At first I thought this was only true with .wav files. However, even after converting those files to .mp3, they still won’t produce sound. Those same files work fine using VLC on my desktop or laptop. So this is definitely an issue with the Raspberry Pi/pHAT setup. Also, the same files always play fine when using the Raspberry Pi’s on-board 3.5mm analog audio jack.

I’ve also noticed that the same files will sometimes produce sound when I’m using OpenELEC. But then, if I start looking through my list of songs, in order to add more songs to my playlist, the song, which is currently playing, will immediately stop producing sound. Once again, this only happens with these certain files.

Any ideas on what may be causing this issue? Once again, this only happens with certain audio files, and it only happens most of the time; not all of the time.

At first I thought it may have something to do with the audio quality which was selected when recording these files. But if that were the case, why would they play sometimes on OpenELEC? And why would they sometimes play fine, until I switch to add more songs to my playlist?

If anyone wants me to provide actual sound files, I can do that. Just let me know were to upload them, or to whom I can E-mail them.

If anyone has any ideas as to what may be causing this problem, I certainly want to hear from you.

Thanks for your time, and I greatly appreciate any help that anyone is able/willing to give.

Hi Steve,

Is this only on the Pi Zero, or other models of Pi as well?

Also how large are the files?

Hello Matt. Thanks for responding so quickly.

I’m using the pHAT with a Raspberry Pi 3.

The .wav files don’t seem to be any bigger, or smaller, than my playable .mp3 files. The one, I just tried to play, is 2.42 MB. After converting it to .mp3, the file is much smaller at 449.5 kB. But like I said, the converted files won’t produce sound either.

I was finally able to plug the pHAT into a Raspberry Pi zero. Once again, it won’t produce sound for the same files as before. It behaves the same way as it did when plugged into the Raspberry Pi 3.

I don’t know what it sees differently about some of these files, but its certainly related to the pHAT, since the files always produce sound on my laptop, desktop, and the analog 3.5mm jack on my Raspberry Pi 3.