[FR] Enhancing CoreAudioFormat with Android System Codec Support

Currently CoreAudioFormat utilize iOS and macOS system codecs for decoding and encoding audio files. I propose expanding its functionality to include support for Android system codecs through native AMediaCodec integration. This enhancement would enable seamless audio processing across multiple platforms and improving compatibility with Android’s native audio capabilities.

Hi there!

That sounds good, but wouldn’t it make more sense for JUCE to integrate FFmpeg instead? It is apparently about 10x faster when working with compressed audio formats (MP3, AAC).

See the links at the end of this article:

@aamf I’ve seen some repositories using FFmpeg also. However, FFmpeg - to my understanding - isn’t available for closed, commercial product and it has a lot of patent issues so JUCE might want to avoid that

I see FFmpeg is LGPL, don’t know about the patents.

The above oboe sample already uses AMediaCodec to decode mp3, so shouldn’t it be already integrated, or is some functionality missing? What are you trying to do and why is it not currently possible?

@aamf I’m trying to decode m4a on Android, JUCE currently doesn’t support that. So I’m proposing to make CoreAudioFormat also works on Android

I’m not sure CoreAudioFormat can be made to work with Android, isn’t it proprietary by Apple and therefore just for iOS and macOS? I understand what you want though, perhaps it would make sense to rename the feature request to something like “Add support for compressed audio formats on Android”.

@aamf Yes I didn’t mean that Android can use the current CoreAudioFormat. I meant that CoreAudioFormat can be upgrade so it can utilize AMediaCodec on Android to decode system-supported formats

CoreAudio is apple tech, there isn’t a CoreAudio implementation for android. What you want is support for AAC codec on android by implementing a AndroidMediaFormat (based on AMediaCodec).

2 Likes