Juce application won't load mp3

Hi, I’m a student, so I’m quite new to Juce. I’m doing a project building a little audio player. I can’t seem to get my application to load and play an mp3. It will load and play a wav file just fine though. I enabled JUCE_USE_MP3AUDIOFORMAT in Projucer, and even tried adding it manually to the preprocessor definitions just in case. I also tested the mp3 files, and they play just fine on other music players, so it’s not the files themselves.

Am I missing some dependency, or is there some other option I need to change? I’m not sure if there’s anything else that I can do, but I feel like I’m probably missing something simple here.

I’m using Ubuntu 20.04 if that makes a difference.

In Projucer go to Modules and click on juce_audio_formats.

Scroll down to juce_use_mp3audioformat and change it to enabled

Since Dr. Yee-King coded his audioplayer over two years ago, JUCE must have switched from enabled to disabled as the default. I have asked him to update his code. As you may know you must also set a preprocessor definition of JUCE_MODAL_LOOPS_PERMITTED=1 for his app as well.

Hi @admonton1! Welcome to the JUCE forum.

If you’re still having troubles, please post the code that you’re working with so we can dissect it. There’s several possibilities of things that could be going wrong :wink: