# Mutiple istances of the same app using alsa does not work (only the first is working) - Linux

**URL:** <https://qa.fmod.com/t/mutiple-istances-of-the-same-app-using-alsa-does-not-work-only-the-first-is-working-linux/13304>\
**Category:** Unity\
**Created:** [July 21, 2017, 9:38am UTC](https://qa.fmod.com/t/mutiple-istances-of-the-same-app-using-alsa-does-not-work-only-the-first-is-working-linux/13304 "2017-07-21T09:38:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xevian](https://avatars.discourse-cdn.com/v4/letter/x/ce7236/32.png) [@xevian](https://qa.fmod.com/u/xevian)\
**Post date:** [July 21, 2017, 9:38am UTC](https://qa.fmod.com/t/mutiple-istances-of-the-same-app-using-alsa-does-not-work-only-the-first-is-working-linux/13304/1 "2017-07-21T09:38:44Z")

</div>

Hi, we are using Unity 5.6.2p1, FMOD 1.08.09 (fmodstudio10809\_v2.unitypackage) on Linux.

Our app runs fine, and it runs on the audio driver we specify via commandline (currently we have 15 drivers enumerated on our machine).

We are currently unable to launch two concurrent instances of the same app using the same audio device.

But we are also unable to run our app after another app that uses fmod (not written by us) running in background.

The first launched app runs fine, but the second app raise many ALSA errors. Seems that the first app locks the audio driver or something similar.

Side note: we need to launch our app via “sudo [appname]” to have alsa devices enumerated correctly. But this should be no problem.

```
    // code we use to initialize fmod
    -- cut ---
    musica1Ev = FMODUnity.RuntimeManager.CreateInstance(musica1Event);
    var studioSystem = FMODUnity.RuntimeManager.StudioSystem;        
FMOD.Studio.CPU_USAGE cpuUsage;
    studioSystem.getCPUUsage(out cpuUsage);
    var lowlevelSystem = FMODUnity.RuntimeManager.LowlevelSystem;
    uint version;
    lowlevelSystem.getVersion(out version);
    fmodInitString += "Version: " + version + "\n";
    result = FMODUnity.RuntimeManager.LowlevelSystem.setDriver(selectedAudioDriver);
    if (result != FMOD.RESULT.OK) fmodInitString += "Error SetDriver\n";        
    --- cut ---

```

Unity Player.log:

Home directory not accessible: Permission denied  
ALSA lib pulse.c:243:(pulse\_connect) PulseAudio: Unable to connect: Connection refused  
ALSA lib pcm\_dmix.c:1022:(snd\_pcm\_dmix\_open) unable to open slave  
ALSA lib pcm\_dsnoop.c:557:(snd\_pcm\_dsnoop\_open) The dsnoop plugin supports only capture stream  
ALSA lib pcm\_dsnoop.c:557:(snd\_pcm\_dsnoop\_open) The dsnoop plugin supports only capture stream  
ALSA lib pcm\_dsnoop.c:557:(snd\_pcm\_dsnoop\_open) The dsnoop plugin supports only capture stream  
Home directory not accessible: Permission denied  
AudioManager: Using ALSA: default  
FMOD Studio: Creating runtime system instance  
OK  
SystemNotInitializedException: FMOD Studio initialization failed : Calling initialize : ERR\_OUTPUT\_INIT : Error initializing output device.  
at FMODUnity.RuntimeManager.CheckInitResult (RESULT result, System.String causSetting up 1 worker threads for Enlighten.  
Thread -\> id: 9defdb40 -\> priority: 1  
FMOD Studio: Destroying runtime system instance  
TUFF  
SystemNotInitializedException: FMOD Studio initialization failed : Calling initialize : ERR\_OUTPUT\_INIT : Error initializing output device.  
at FMODUnity.RuntimeManager.CheckInitResult (RESULT result, System.String cause) [0x00000] in :0  
at FMODUnity.RuntimeManager.Initialiase (Boolean forceNoNetwork) [0x00000] in :0  
at FMODUnity.RuntimeManager.get\_Instance () [0x00000] in :0  
…  
repeated forever.

Thanks for your time, Christian

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [July 24, 2017, 4:20am UTC](https://qa.fmod.com/t/mutiple-istances-of-the-same-app-using-alsa-does-not-work-only-the-first-is-working-linux/13304/2 "2017-07-24T04:20:41Z")

</div>

This could be a configuration issue with the ALSA setup or driver. Some are exclusive access and some allow multiple access.
