m4a decoding on Windows?


#1

Hello

I am sorry if this has been covered in another topic. If it has, I could not find it : I want to play an .m4a file from my iTunes library. I am developing on Windows. It seems to me that the Windows version of JUCE has no decoder for .m4a files, correct ? (I found WAV, MP3, AIFF, Ogg, FLAC and WMA). I am asking because I saw some people mentioning successful playback of m4a files but I assume they were running JUCE on a Mac.

If I am correct, are you aware of any free (possibly binary-only) conversion code or library that could decode .m4a files (which, I believe, are mpeg-4 wrappers with a single aac essence).

BTW, I am using JUCE 2.0.27.

Thanks for your help.

Benjamin-


#2

On Windows you can use the WindowsMediaAudioFormat class, but whether it can open a .m4a file depends entirely on whether DirectShow supports that codec or not.


#3

You could also use the QuicktimeFormatReader, Quicktime has to be installed on the users machine though to work.
You can open all formats Quicktime supports like this without being concerned about licensing.


#4

Hello

Thanks for your help. Unfortunately, I’ve run into problems with #import directives clashing with the compiler /MP flag (which I do not want to drop) when using the QT SDK, and I could not find a way to enable the WindowsMediaFormat reader to swallow .m4a files, even though I’ve changed its extensions array to force it into accepting the file, and even though MediaPlayer is able to play it fine.

Never mind, this was a nice-to-have feature, but not critical.

Thanks again for your kind help.

Benjamin