# Infinity Master Bank loading when using plugins in C#

**URL:** https://qa.fmod.com/t/infinity-master-bank-loading-when-using-plugins-in-c/16347
**Category:** FMOD Engine
**Tags:** csharp
**Created:** [October 24, 2020, 1:25pm UTC](https://qa.fmod.com/t/infinity-master-bank-loading-when-using-plugins-in-c/16347 "2020-10-24T13:25:57Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![7Bpencil](https://avatars.discourse-cdn.com/v4/letter/7/cab0a1/32.png) [@7Bpencil](https://qa.fmod.com/u/7Bpencil)
#### Post date: [October 24, 2020, 1:25pm UTC](https://qa.fmod.com/t/infinity-master-bank-loading-when-using-plugins-in-c/16347/1 "2020-10-24T13:25:57Z")

</div>

Hello, need help, maybe I am doing smth wrong, but I’ve not found how to do it right.

Okay, I happily used FMOD without plugins with this simple code: [FMODaudio](https://pastebin.com/29yscbW8)

Then I decided to try Resonance Audio: read tutorial, did necessary stuff in Studio, copy-pasted **resonanceaudio.dll** next to **fmod.dll** and **fmodstudio.dll** , and put

```auto
fmodSystem.loadPlugin("libs\\resonanceaudio.dll", out var handle)" 

```

at line 22 so it would look like this: [FMODaudioPlugins](https://pastebin.com/sKkHY7sF)

In result I have got infinity while(true) loop because

```auto
masterBank.getLoadingState(out var loadingState)

```

returns **UNLOADED** at every cycle, but

```auto
masterBankStrings.getLoadingState(out var stringsState)

```

returns **LOADED**.  
I have not received any additional errors.

If I remove code, that checks loadingState (basicly whole loop), I get **ERR\_EVENT\_NOTFOUND** in

```auto
system.getEvent(path, out var description).

```

I use FMOD 2.01.05 and this is my project: [FMOD\_Project](https://drive.google.com/file/d/1Q2nsz0SuQ0t_2Knr-WvSLe-OMvl4Vbve/view?usp=sharing)

Please tell me what I am doing wrong.  
Thanks

---

<div class="post-metadata">

### Author: ![7Bpencil](https://avatars.discourse-cdn.com/v4/letter/7/cab0a1/32.png) [@7Bpencil](https://qa.fmod.com/u/7Bpencil)
#### Post date: [October 24, 2020, 6:51pm UTC](https://qa.fmod.com/t/infinity-master-bank-loading-when-using-plugins-in-c/16347/2 "2020-10-24T18:51:18Z")

</div>

Okay, looks like It’s not required to check is banks are loaded or not. So I simplified code:

```auto
public static void Initialize()
{
	CheckResult(Factory.System_Create(out fmodSystem));
	CheckResult(fmodSystem.init(512, INITFLAGS.NORMAL, IntPtr.Zero));
	CheckResult(FMOD.Studio.System.create(out system));
	CheckResult(system.initialize(512, FMOD.Studio.INITFLAGS.NORMAL, FMOD.INITFLAGS.NORMAL, IntPtr.Zero));
    CheckResult(fmodSystem.loadPlugin(@"libs\resonanceaudio.dll", out var pluginHandle));

	cachedEventDescriptions = new Dictionary<string, EventDescription>();
	CheckResult(system.loadBankFile(@"assets\Audio\Desktop\Master.bank", LOAD_BANK_FLAGS.NORMAL, out var masterBank));
	CheckResult(system.loadBankFile(@"assets\Audio\Desktop\Master.strings.bank", LOAD_BANK_FLAGS.NORMAL, out var masterBankStrings));
}

```

---

<div class="post-metadata">

### Author: ![7Bpencil](https://avatars.discourse-cdn.com/v4/letter/7/cab0a1/32.png) [@7Bpencil](https://qa.fmod.com/u/7Bpencil)
#### Post date: [October 25, 2020, 2:42pm UTC](https://qa.fmod.com/t/infinity-master-bank-loading-when-using-plugins-in-c/16347/3 "2020-10-25T14:42:28Z")

</div>

Oh I got it, silly me. We should use coreSystem that was created by FMOD.Studio.System.  
So correct code looks like this: [FMODcorrect](https://pastebin.com/5Zu8FV8L)
