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?

1 Like

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

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:

1 Like