# AudioPluginFormatManager addDefaultFormats() not adding any formats

**URL:** <https://forum.juce.com/t/audiopluginformatmanager-adddefaultformats-not-adding-any-formats/15205>\
**Category:** Audio Plugins\
**Created:** [July 28, 2015, 9:42pm UTC](https://forum.juce.com/t/audiopluginformatmanager-adddefaultformats-not-adding-any-formats/15205 "2015-07-28T21:42:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![klebs](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/klebs/32/155_2.png) [@klebs](https://forum.juce.com/u/klebs)\
**Post date:** [July 28, 2015, 9:42pm UTC](https://forum.juce.com/t/audiopluginformatmanager-adddefaultformats-not-adding-any-formats/15205/1 "2015-07-28T21:42:19Z")

</div>

This has been stumping me for a few hours and I'm at a loss for a solution. &nbsp;I've been looking at working example code in the xcode debugger&nbsp;and have been getting the expected results. &nbsp;For some reason, whenever I try it on my own code, no formats are stored.

I have been declaring a private&nbsp;AudioPluginFormatManager called formatManager in my PluginProcessor.h file and calling formatManager.addDefaultFormats() in the first line of the&nbsp;constructor in my PluginProcessor.cpp file. &nbsp;When I step through the code, something I can't explain happens. &nbsp;

I put a breakpoint in the constructor, and also in prepareForPlay for my plugin processor and checked the debugger for each. &nbsp;At&nbsp;the first breakpoint, numAllocated and numUsed for the formatManager were extremely large integers. &nbsp;At the second breakpoint, they were both zero. &nbsp;I can't figure out what to make of this behavior. &nbsp;

I'm relatively new to JUCE, so please excuse me if there is an obvious answer to this problem.

&nbsp;

Thank you for any help! &nbsp;

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [July 29, 2015, 7:28am UTC](https://forum.juce.com/t/audiopluginformatmanager-adddefaultformats-not-adding-any-formats/15205/2 "2015-07-29T07:28:43Z")

</div>

You're probably looking at a different instance of the object the second time?

---

<div class="post-metadata">

**Author:** ![klebs](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/klebs/32/155_2.png) [@klebs](https://forum.juce.com/u/klebs)\
**Post date:** [July 29, 2015, 2:22pm UTC](https://forum.juce.com/t/audiopluginformatmanager-adddefaultformats-not-adding-any-formats/15205/3 "2015-07-29T14:22:00Z")

</div>

Thanks for the reply--I just solved the problem, but it wasn't that.

I guess there's something to be said for a fresh start on a new day. To fix this, I went into the introjucer and under the juce\_audio\_processors module for my project, enabled the JUCE\_PLUGINHOST\_VST option (I don't need the others at the moment). It was set to default, and that was preventing the proper areas of the module code from being run when I called addDefaultFormats()

Sure enough, this worked! Hopefully this helps anybody else running into the same problem.

---

<div class="post-metadata">

**Author:** ![ToneCre8](https://avatars.discourse-cdn.com/v4/letter/t/4af34b/32.png) [@ToneCre8](https://forum.juce.com/u/ToneCre8)\
**Post date:** [April 12, 2017, 12:08am UTC](https://forum.juce.com/t/audiopluginformatmanager-adddefaultformats-not-adding-any-formats/15205/4 "2017-04-12T00:08:07Z")

</div>

Thanks for following up on this. Had to same issue and this was the resolution.
