MP3 encoding on iOS

I’m trying to get lame installed for an iOS app. I’m using a version of the lame library bundled into an iOS framework (https://github.com/wuqiong/mp3lame-for-iOS).

I’m getting the following error in the simulator.

Failed to load Info.plist from bundle at path <path-to>MyCoolApp.app/Frameworks/lame.framework

I tried compiling and running another demo iOS (not JUCE) app using the same framework and it works. Wonder if there might be a (missing?) setting in the JUCE project causing problems with Xcode…

An a side note, I wonder if it might be possible for JUCE to include an mp3 encoder now that the patent has run its course?

2 Likes

IIRC JUCE already has lame encoding? (under juce_audio_formats):
image

It might be easier.
If you do need to use frameworks with newer versions the JUCE team added a Framework input field. basically if you don’t copy it to your .app (manually by script or by Xcode) it wouldn’t be there.

From the JUCE docs:

LameEncoderAudioFormat AudioFormat class which can use an installed version of the LAME mp3 encoder to encode a file.

i.e. it needs LAME to be installed or given a path to where it can find it.

The project in question is using a custom AudioFormat that uses LAME directly.

The relevant Projucer settings:

…and the folder structure (the framework is alongside the project)
52

1 Like

I noticed the working demo app does not embed the framework. So I moved the ‘lame.framework’ to Extra Custom Frameworks. Then shortened it to just “lame”. Then clean and rebuild and it works! :slight_smile:

2 Likes

Hey @adamwilson. Thanks for sharing this info!

Do you still use this repo? Seems like it hasn’t been updated since 2018.

Many thanks!
Jeff