# How to obtain the audio format of FSB files

**URL:** <https://qa.fmod.com/t/how-to-obtain-the-audio-format-of-fsb-files/20981>\
**Category:** FMOD Engine\
**Tags:** cpp\
**Created:** [December 12, 2023, 7:37am UTC](https://qa.fmod.com/t/how-to-obtain-the-audio-format-of-fsb-files/20981 "2023-12-12T07:37:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wbx](https://avatars.discourse-cdn.com/v4/letter/w/13edae/32.png) [@wbx](https://qa.fmod.com/u/wbx)\
**Post date:** [December 12, 2023, 7:37am UTC](https://qa.fmod.com/t/how-to-obtain-the-audio-format-of-fsb-files/20981/1 "2023-12-12T07:37:59Z")

</div>

I have loaded an FSB file in C++, and I’m trying to determine the encoding format of the Sounds it contains. However, all types are indicated as FSB format, which is not the Vorbis or PCM format I chose during packaging. How can I retrieve the format selected during packaging?

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [December 17, 2023, 10:33pm UTC](https://qa.fmod.com/t/how-to-obtain-the-audio-format-of-fsb-files/20981/2 "2023-12-17T22:33:44Z")

</div>

Hi,

You can only play .FSB files with FMOD, so you shouldn’t need to know the encoding format as FMOD will handle decoding it. Is there a specific reason that you need to figure out this information? I may be able to suggest a solution for your given use-case.

---

<div class="post-metadata">

**Author:** ![wbx](https://avatars.discourse-cdn.com/v4/letter/w/13edae/32.png) [@wbx](https://qa.fmod.com/u/wbx)\
**Post date:** [December 18, 2023, 2:14am UTC](https://qa.fmod.com/t/how-to-obtain-the-audio-format-of-fsb-files/20981/3 "2023-12-18T02:14:56Z")

</div>

Hello,

My project’s audio adopts the same encoding format, so I need to use C++scripts to batch verify whether there are unexpected situations in the audio format.

I use the following code to read the audio format.

```auto
system->createSound(fsb_path, FMOD_DEFAULT, 0, &fsb);
fsb->getSubSound(count, &subsound);
subsound->getFormat(&type, &format, &channels, &bits);

```

But this code cannot retrieve the encoding format I selected in fmod designer.

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [December 21, 2023, 1:09am UTC](https://qa.fmod.com/t/how-to-obtain-the-audio-format-of-fsb-files/20981/4 "2023-12-21T01:09:38Z")

</div>

Unfortunately, there’s no way to retrieve the encoding format that was set during the bank building process. I can see the use-case for being able to manually verify the format of encoded audio in banks, so I’ve added it to our internal feature/improvement tracker.

That said, the FSBank API is quite robust and well-tested at this point, so while I’m not discounting your desire the verify the format of encoded assets, it’s unlikely that there should be issues. Are you running into any specific errors with your encoded FSB files?

---

<div class="post-metadata">

**Author:** ![wbx](https://avatars.discourse-cdn.com/v4/letter/w/13edae/32.png) [@wbx](https://qa.fmod.com/u/wbx)\
**Post date:** [December 22, 2023, 2:15am UTC](https://qa.fmod.com/t/how-to-obtain-the-audio-format-of-fsb-files/20981/5 "2023-12-22T02:15:34Z")

</div>

I will consider other ways to achieve the functionality I want, and I have no further questions. Thank you for your help.
