createReaderFor returning nullptr on certain mp3s


#1

Hello,

I am encountering situations on Mac and Win where createReaderFor returns nullptr on certain mp3s. On Juce Demo these files don't display a waveform on the File Playback page. There is likely something wrong with the mp3s themselves but I am still able to play these files in every other player I've tried (Windows Media Player, VLC, OSX preview, Chrome).

Does anyone have any advice on getting them to play in a Juce app or am I out of luck?

I have some sample "trouble" mp3s here.

http://128.199.161.72:8000/testmp3/


#2

The mp3 decoder isn't guaranteed to handle every crazy format out there, so this isn't a huge surprise. You might prefer to use the CoreAudio or DirectShow codecs for this kind of thing, which will support a wider range.


#3

Drilling into the code, I do appear to be using the AudioFormatReader in WMAudioReader. Is this the same as the DirectShow codecs or did you mean I might want to try the DirectShowComponent to render my mp3s?


#4

Yes, that's what I mean. So if it's returning nullptr it's because the OS doesn't have a codec for that type of file.