Why can't JUCE read this seemingly well-formatted audio file?


#1

I was working with someone with a Linux system using some of my JUCE code to play audio.

He couldn't get it to work, even though he tried two separate audio files... but it turned out my code was fine... the files he picked didn't play with Juce, but play with e.g. Amadeus Pro or in Safari or Chrome.  

Here's one of them:  http://ax.to/batman_theme_x.wav

When I step through it in a "known good program" of mine, I can see that it does in fact match the CoreAudioFormat - but when it gets to calling AudioFileOpenWithCallbacks, there's an error returned and nothing is created.

But that wouldn't explain why it doesn't work on Linux!

The file is a little weird - a 16-bit, 1 channel, 11.025KHz WAV file - but it's definitely OK, you can hear it yourself.

Any idea what's up?  It's not a big deal - I'm not getting complaints from people that they can't play their files - but I'm curious.


#2

Well, the juce wav parser is kicking it out because it uses an mp3 encoding. I'm surprised that the CoreAudio codecs wouldn't play it though, when QuickTime seems happy to play it.


#3

I didn't think to check for that!

Well, that's actually pretty good - that it read the badly encoded file and didn't sick up.