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

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

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