# Creating fsb with FSBank API Problem

**URL:** <https://qa.fmod.com/t/creating-fsb-with-fsbank-api-problem/18808>\
**Category:** FMOD Engine\
**Tags:** csharp, cpp\
**Created:** [May 27, 2022, 1:02pm UTC](https://qa.fmod.com/t/creating-fsb-with-fsbank-api-problem/18808 "2022-05-27T13:02:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CreatorsStudio](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/creatorsstudio/32/3590_2.png) [@CreatorsStudio](https://qa.fmod.com/u/CreatorsStudio)\
**Post date:** [May 27, 2022, 1:02pm UTC](https://qa.fmod.com/t/creating-fsb-with-fsbank-api-problem/18808/1 "2022-05-27T13:02:26Z")

</div>

I am using this code to convert a wav to fsb5

```auto
#include <stdio.h>
#include <iostream>
#include <FSB/fsbank.h>

using namespace std;

extern "C" _declspec(dllexport) void Create();

void main()
{
	const char* cache = "G:/cache";
	FSBank_Init(FSBANK_FSBVERSION_FSB5, FSBANK_INIT_NORMAL, (unsigned int)2, cache);
	FSBANK_SUBSOUND subsound;
	const char* const msg = "G:/u.wav";
	subsound.fileNames = &msg;
	subsound.overrideFlags = FSBANK_BUILD_DISABLESYNCPOINTS;
	subsound.overrideQuality = 1;
	subsound.desiredSampleRate = 1;
	const FSBANK_SUBSOUND* newSubsound = &subsound;

	FSBANK_RESULT res = FSBank_Build(newSubsound, 1, FSBANK_FORMAT_VORBIS, FSBANK_BUILD_DEFAULT | FSBANK_BUILD_DONTLOOP, 100, NULL, "G:/test.fsb5");
	cout << "works" << endl;
	getchar();
}

```

for some reason it does not work but do compile and the code gets executed but stuck  
Here is the output i get

 ![Untitled](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/7/76196ad768ad390a67044df265a5126aaf726e3e.png)

And i get no output fsb5 as well

Please help and guide me where I am wrong

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [June 1, 2022, 10:57pm UTC](https://qa.fmod.com/t/creating-fsb-with-fsbank-api-problem/18808/2 "2022-06-01T22:57:08Z")

</div>

Linking in this case: [FSBank Conversion of wav to fsb5 problem - #10 by CreatorsStudio](https://qa.fmod.com/t/fsbank-conversion-of-wav-to-fsb5-problem/18803/10)  
This issue was due to not initializing `FSBANK_SUBSOUND`, which needed to be initialized like this:

```auto
FSBANK_SUBSOUND subsound = {};

```
