Max Application with embedded MP3s
Hi everyone,
for a project, I am building an app with Max/MSP.
It worked like a charm...! :)
The problem was, it is a patch that carries 5 sounds of nearly 20min. The .aif make the app really heavy and so I tried to do the exact same thing with mp3.
So the patch with mp3 works perfectly but then, when I build the app, it crashes when I open it....
Just out of curiousity, I tried to change the extension to .aif (but keeping them light - because it's still mp3)... So, again, the patch works perfectly.
Then, when I build the app, it opens really great, except that the audio won't start. Like never.
So, to sum up :
App with .aif > works perfectly but really heavy
App with .mp3 > crashes at opening
App with .mp3 renamed as .aif > opens but audio doesn't start...
(Note that everytime, the patch as .maxpat works - the problem occur after the app building process)
If anyone had the same experience, or if someone knows something that I missed, please tell me :)
Cheers to everyone,
k.
UPDATE :
After few tests :
- the "fake aif" version fail to open .aif files that are in fact .mp3 (even though it's working in Max, as a .maxpat). That's legit !
- On the true MP3 version, I have put a delay of 1sec before the preloading of the mp3s (5 in total). And then, built on .app, it opens but then crash 1sec after that....
SO it appears that max built app crash when loading MP3. That's that.... Is anyone have any experience about that ????
I ran into this a couple of years ago. Since you didn't post a patch, I'm making the assumption that you are trying to load the mp3 into a buffer. You need to use the "import" message for loading mp3 files. Max uses QuickTime to convert the media as it imports. Take a look at the [buffer~] Reference documentation for under Messages>import for detailed info. I hope that helps.
Hi, thanks for replying !
In fact I am using 5 sfplay and I just found a solution.
I was disabling the "Include C74 Resources" in the standalone object informations window (since it was working with .aif files).
I was experimenting stuff and realized that if I enable the "Include C74 Resources", it works... There must be something there that allows Max to load MP3. For information, it is the same thing with .flac (you'll need to INCLUDE c74 resources for that as well, otherwise the app crashes).
If I remember well, sfplay supporting MP3 and flac (and m4a) came at the same time and I assume they all need "something" from the c74 resources to load them within an app (on the contrary, .aif don't).