# FMOD\_ERR\_OUTPUT\_INIT with Unix + SPEAKERMODE\_RAW

**URL:** <https://qa.fmod.com/t/fmod-err-output-init-with-unix-speakermode-raw/12893>\
**Category:** FMOD Engine\
**Created:** [December 23, 2016, 2:23am UTC](https://qa.fmod.com/t/fmod-err-output-init-with-unix-speakermode-raw/12893 "2016-12-23T02:23:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsteinwedel1](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@dsteinwedel1](https://qa.fmod.com/u/dsteinwedel1)\
**Post date:** [December 23, 2016, 2:23am UTC](https://qa.fmod.com/t/fmod-err-output-init-with-unix-speakermode-raw/12893/1 "2016-12-23T02:23:47Z")

</div>

I’m trying to get an application running on a Unix (Ubuntu) system. I’m running into an issue when calling System-\>Init(). My startup code is below. I’ve tried forcing with each driver on my system (I’ve got 3) and get the same result each time. Changing FMOD\_SPEAKERMODE\_RAW to FMOD\_SPEAKERMODE\_DEFAULT or STEREO in the setSoftwareFormat() call yields a FMOD\_OK result.

Any help would be appreciated.

```
void StartFmod()
{
    FMOD_RESULT result;

    result = FMOD::System_Create(&mSystem);
    ERRCHECK(result);

    result = mSystem->getDriver(&nCurrentDriver);
    ERRCHECK(result);

    // it's possible to decide to set a different driver between the last
    // line of code and this line
    // Have posted simplified code for support purposes
    result = mSystem->setDriver(nCurrentDriver);
    ERRCHECK(result);

    FMOD_SPEAKERMODE speakerMode = FMOD_SPEAKERMODE::FMOD_SPEAKERMODE_MONO;
    int speakerModeChannels;
    int sampleRate;
    char* name;
    result = mSystem->getDriverInfo(nCurrentDriver, name, 50, 0, &sampleRate, &speakerMode, &speakerModeChannels);
    ERRCHECK(result);

    mSystem->setSoftwareFormat(sampleRate, FMOD_SPEAKERMODE_RAW, speakerModeChannels);

    FMOD_INITFLAGS flags = FMOD_INIT_NORMAL;
    result = mSystem->init(32, flags, 0);
    ERRCHECK(result);
}
```

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [January 3, 2017, 4:53am UTC](https://qa.fmod.com/t/fmod-err-output-init-with-unix-speakermode-raw/12893/2 "2017-01-03T04:53:16Z")

</div>

> [@](#):
>
> I’m trying to get an application running on a Unix (Ubuntu) system. I’m running into an issue when calling System-\>Init(). My startup code is below. I’ve tried forcing with each driver on my system (I’ve got 3) and get the same result each time. Changing FMOD\_SPEAKERMODE\_RAW to FMOD\_SPEAKERMODE\_DEFAULT or STEREO in the setSoftwareFormat() call yields a FMOD\_OK result.
> 
> Any help would be appreciated.
> 
> ```
> void StartFmod()
> {
> FMOD_RESULT result;
> 
> result = FMOD::System_Create(&mSystem);
> ERRCHECK(result);
> 
> result = mSystem->getDriver(&nCurrentDriver);
> ERRCHECK(result);
> 
> // it's possible to decide to set a different driver between the last
> // line of code and this line
> // Have posted simplified code for support purposes
> result = mSystem->setDriver(nCurrentDriver);
> ERRCHECK(result);
> 
> FMOD_SPEAKERMODE speakerMode = FMOD_SPEAKERMODE::FMOD_SPEAKERMODE_MONO;
> int speakerModeChannels;
> int sampleRate;
> char* name;
> result = mSystem->getDriverInfo(nCurrentDriver, name, 50, 0, &sampleRate, &speakerMode, &speakerModeChannels);
> ERRCHECK(result);
> 
> mSystem->setSoftwareFormat(sampleRate, FMOD_SPEAKERMODE_RAW, speakerModeChannels);
> 
> FMOD_INITFLAGS flags = FMOD_INIT_NORMAL;
> result = mSystem->init(32, flags, 0);
> ERRCHECK(result);
> }
> 
> ```

Could you provide some details about what you’re trying to achieve with the RAW speaker mode? Usually this is for a setup with \>8 channels.

---

<div class="post-metadata">

**Author:** ![dsteinwedel1](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@dsteinwedel1](https://qa.fmod.com/u/dsteinwedel1)\
**Post date:** [January 11, 2017, 7:14pm UTC](https://qa.fmod.com/t/fmod-err-output-init-with-unix-speakermode-raw/12893/3 "2017-01-11T19:14:12Z")

</div>

I’ve made a distributed stereo / music playback system for a physical location. EG I have a house with 5 rooms and want to be able to control playback of any audio source to any combination of rooms.

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [January 12, 2017, 4:33am UTC](https://qa.fmod.com/t/fmod-err-output-init-with-unix-speakermode-raw/12893/4 "2017-01-12T04:33:52Z")

</div>

Thanks for the info, could you link with the logging version of FMOD and provide the stderr output?

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [January 11, 2017, 3:11am UTC](https://qa.fmod.com/t/fmod-err-output-init-with-unix-speakermode-raw/12893/5 "2017-01-11T03:11:04Z")

</div>

Without further information of your goal, my recommendation would be to remove the code that explicitly sets the speakers mode or choose a particular speaker mode you want to design your application / game for.

FMOD will handle up/down mixing as necessary depending on the hardware on each device.
