First Project. Help with fixing issues such as assertion failure and wont play mp3's

Hello,

New to Juce and now that ive finally got it working I have been trying to convert the basic audio player tutorial into a plugin for use in the plugin host.

I coded it based on some guesswork and intuition and wont pretend to understand everything.

My project builds the VST and a standalone version. When coding I used the standalone to test and see what worked.

when I run the standalone I get these console errors:

image

The standalone then starts and is basically just the tutorial in plugin format

image

When I open a .wav file and use all the buttons shown it works as expected, despite the errors printed above. However when I load an .mp3 file I get a silent output with no console errors. The way I instructed the program to allow mp3’s was like this

Im not sure why they will not play…

Anyway so I also decided to test the VST in the plugin host. I am able to load in a file but as soon as i hit “Play” I get the following:

image

This is only for the VST version.

My previous experience with audio apps was not with Juce and I never realy used debugging programs such as GDB. To be honest I used to just fix everything with prints and by listening.

Im happy to do the work myself but wanted to ask if anyone knows of some typical reasons regarding why im having these issues.

I also wanted to ask - what would be your process in fixing these issues? Should I somehow put the VST into GDB (which I will go and learn) and if so, do I have to build a special VST for this to work? (like a debugging version)

Also I was thinking maybe I have messed up a projucer setting which could be causing the issues.

Any tips regarding the above would be appreciated. Happy to post more info etc or to read up on stuff. Just looking to be pointed in the right direction, Thanks

Did you set “Enable MP3 audio format” in the projucer?

For the Assertion the first look should be on the code that is pointing. The comments above the Assertion gives you a hint of what’s the problem.

A stack trace can show you a way to the crash. You can see the last function call that leads to the crash and you can follow to the latest function call of your code. This should give you an idea of what is going on and what’s wrong.

ok Thanks ill look into that.

I cant see any Mp3 options in the Projucer but I did find this
https://docs.juce.com/master/classMP3AudioFormat.html

which might serve the same purpose?

@tex25 the juce_audio_formats module has a JUCE_USE_MP3AUDIOFORMAT option that is “Disabled” by default:

Thankyou I missed it.

Unfortunately it made no difference but good to know where it is