# Output\_mp3 plugin

**URL:** <https://qa.fmod.com/t/output-mp3-plugin/23594>\
**Category:** FMOD Engine\
**Created:** [November 6, 2025, 8:53am UTC](https://qa.fmod.com/t/output-mp3-plugin/23594 "2025-11-06T08:53:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![icing](https://avatars.discourse-cdn.com/v4/letter/i/c5a1d2/32.png) [@icing](https://qa.fmod.com/u/icing)\
**Post date:** [November 6, 2025, 8:53am UTC](https://qa.fmod.com/t/output-mp3-plugin/23594/1 "2025-11-06T08:53:28Z")

</div>

We try to use two samples from FMOD engine, SimpleEvent and Output\_mp3, to output a mp3 file for a given event.

We first build the output\_mp3L64.dll using output\_mp3 project. and then use following code.

The problem is output\_state-\>readfrommixer(output\_state, destptr, l); always returns FMOD\_ERR\_INTERNAL. Please help us to indicate why, thank you!

/\*==============================================================================  
Simple Event Example  
Copyright (c), Firelight Technologies Pty, Ltd 2012-2019.

This example demonstrates the various ways of playing an event.

#### Explosion Event

This event is played as a one-shot and released immediately after it has been  
created.

#### Looping Ambience Event

A single instance is started or stopped based on user input.

#### Cancel Event

This instance is started and if already playing, restarted.

==============================================================================\*/  
#include “fmod\_studio.hpp”  
#include “fmod.hpp”  
#include “common.h”

int FMOD\_Main()  
{  
void\* extraDriverData = NULL;  
Common\_Init(&extraDriverData);

```auto
FMOD::Studio::System* system = NULL;
ERRCHECK(FMOD::Studio::System::create(&system));

// The example Studio project is authored for 5.1 sound, so set up the system output mode to match
FMOD::System* coreSystem = NULL;
ERRCHECK(system->getCoreSystem(&coreSystem));

unsigned int pluginHandle = 0;
ERRCHECK(coreSystem->loadPlugin("output_mp3L64.dll", &pluginHandle));
ERRCHECK(coreSystem->setOutputByPlugin(pluginHandle));

ERRCHECK(coreSystem->setSoftwareFormat(0, FMOD_SPEAKERMODE_5POINT1, 0));

ERRCHECK(system->initialize(1024, FMOD_STUDIO_INIT_NORMAL, FMOD_INIT_NORMAL, extraDriverData));

FMOD::Studio::Bank* masterBank = NULL;
ERRCHECK(system->loadBankFile(Common_MediaPath("Master.bank"), FMOD_STUDIO_LOAD_BANK_NORMAL, &masterBank));

FMOD::Studio::Bank* stringsBank = NULL;
ERRCHECK(system->loadBankFile(Common_MediaPath("Master.strings.bank"), FMOD_STUDIO_LOAD_BANK_NORMAL, &stringsBank));

FMOD::Studio::Bank* sfxBank = NULL;
ERRCHECK(system->loadBankFile(Common_MediaPath("Sound2D.bank"), FMOD_STUDIO_LOAD_BANK_NORMAL, &sfxBank));

// Get the Single Explosion event
FMOD::Studio::EventDescription* eventDescription = NULL;
ERRCHECK(system->getEvent("event:/Sound2D/ui_boss_1", &eventDescription));

// Get instance
FMOD::Studio::EventInstance* eventInstance = NULL;
ERRCHECK(eventDescription->createInstance(&eventInstance));

ERRCHECK(eventInstance->start());

// Wait for the event to finish playing
FMOD_STUDIO_PLAYBACK_STATE state;
do {
    ERRCHECK(eventInstance->getPlaybackState(&state));
    ERRCHECK(system->update());

    Common_Sleep(50);
} while (state != FMOD_STUDIO_PLAYBACK_STOPPED);

// Release the event instance after playback
ERRCHECK(eventInstance->release());

ERRCHECK(sfxBank->unload());
ERRCHECK(stringsBank->unload());
ERRCHECK(masterBank->unload());

ERRCHECK(system->release());

Common_Close();

return 0;

```

}

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [November 13, 2025, 3:26am UTC](https://qa.fmod.com/t/output-mp3-plugin/23594/2 "2025-11-13T03:26:55Z")

</div>

Hi,

Thank you for sharing the information and code.

May I confirm which version of FMOD Engine you are using?

> [@icing](#):
>
> `ERRCHECK(coreSystem->setSoftwareFormat(0, FMOD_SPEAKERMODE_5POINT1, 0));`

The issue is likely caused by the mixer being configured for 5.1 output.

The `output_mp3 example` only supports mono or stereo input, so requesting a 5.1 mix might vcause readfrommixer to return FMOD\_ERR\_INTERNAL.

Could you please try forcing the software format to stereo before calling initialize, for example:

```auto
ERRCHECK(coreSystem->setSoftwareFormat(48000, FMOD_SPEAKERMODE_STEREO, 0));

```

Let me know if the issue persists.

---

<div class="post-metadata">

**Author:** ![icing](https://avatars.discourse-cdn.com/v4/letter/i/c5a1d2/32.png) [@icing](https://qa.fmod.com/u/icing)\
**Post date:** [November 14, 2025, 8:18am UTC](https://qa.fmod.com/t/output-mp3-plugin/23594/3 "2025-11-14T08:18:51Z")

</div>

Thank you very much!

We changed from FMOD\_SPEAKERMODE\_5POINT1 to FMOD\_SPEAKERMODE\_STEREO, but the issue persists.

We are using FMOD Studio API Windows version 2.00.06.

We also tried FMOD Studio API Windows version 2.03.10, the problem is the same.

Thanks again!

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [November 21, 2025, 6:25am UTC](https://qa.fmod.com/t/output-mp3-plugin/23594/4 "2025-11-21T06:25:39Z")

</div>

Thanks for trying that!

I was able to reproduce the behavior you described on my side as well.  
I’ve passed the details on to our dev team so they can take a closer look.

Thank you for bringing this to our attention

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [January 9, 2026, 12:24am UTC](https://qa.fmod.com/t/output-mp3-plugin/23594/5 "2026-01-09T00:24:21Z")

</div>

Hi,

Just wanted to follow up here.

Could you please try setting the DSP buffer size before calling initialize() and see if the output is recorded correctly? For example:

```auto
coreSystem->setDSPBufferSize(1152, 2); 
system->initialize(...);

```

In my testing, the MP3 output remained silent unless the DSP buffer size was explicitly set prior to initialization.

Let me know if this makes any difference on your end.

Thanks!
