# Trying to play an event on a secondary Studio System

**URL:** https://qa.fmod.com/t/trying-to-play-an-event-on-a-secondary-studio-system/22221
**Category:** Unity
**Created:** [October 24, 2024, 6:18pm UTC](https://qa.fmod.com/t/trying-to-play-an-event-on-a-secondary-studio-system/22221 "2024-10-24T18:18:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Chris\_viaVR](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Chris\_viaVR](https://qa.fmod.com/u/Chris_viaVR)
#### Post date: [October 24, 2024, 6:18pm UTC](https://qa.fmod.com/t/trying-to-play-an-event-on-a-secondary-studio-system/22221/1 "2024-10-24T18:18:24Z")

</div>

Hi, in my Unity Project, I’m trying to have 2 separate Studio Systems, both routed to separate windows outputs, on both of which I’d like to play events.

With the help of [this](https://qa.fmod.com/t/playing-different-audios-simultaneously-through-different-output-devices/18461/2) forum post, I made two separate Studio Systems. I can assign a different driver/output to each and play a sound on either one of them using:

```auto
    IEnumerator PlaySoundAndReleaseSystem1()
    {
        var soundResult_test = FMODUnity.RuntimeManager.CoreSystem.createSound( application.dataPath + "/Sounds/DemoSound.mp3", FMOD.MODE.DEFAULT, out var sound_test);

        FMODUnity.RuntimeManager.CoreSystem.playSound(sound_test, cgSys1, false, out chaSys1);

        bool isPlaying = true;
        while (isPlaying)
        {
            chaSys1.isPlaying(out isPlaying);
            yield return null;
        }

        sound_test.release();
    }

```

Or the same, on the secondary sysrtem by replacing “CoreSystem” with “SecondaryCoreSystem”. This works well and plays the sound.

Now, I’d like to be able to play events from a bank, instead of using mp3 files. Playing an event on the (Primary/Original) StudioSystem works as it should, however, playing an event on my SecondaryStudioSystem gives issues.

I have the following:

```auto
using UnityEngine;

public class EventOnSecondarySystem : MonoBehaviour
{
    private void Start()
    {
        FMOD.Studio.Bank masterBankStrings;
        FMOD.RESULT result = FMODUnity.RuntimeManager.SecondaryStudioSystem.loadBankFile("C:\\...\\Master.bank", FMOD.Studio.LOAD_BANK_FLAGS.NORMAL, out masterBankStrings);
        UnityEngine.Debug.Log("Loading Master Bank: " + result);

        FMOD.Studio.Bank masterBank;
        result = FMODUnity.RuntimeManager.SecondaryStudioSystem.loadBankFile("C:\\...\\Master.strings.bank", FMOD.Studio.LOAD_BANK_FLAGS.NORMAL, out masterBank);
        UnityEngine.Debug.Log("Loading Master Bank Strings: " + result);

        FMOD.Studio.Bank bankSecondarySystem;
        string bank_path = "C:\\...\\VO.bank";
        result = FMODUnity.RuntimeManager.SecondaryStudioSystem.loadBankFile(bank_path, FMOD.Studio.LOAD_BANK_FLAGS.NORMAL, out bankSecondarySystem);
        UnityEngine.Debug.Log("Loading Secondary Bank: " + result);

        FMOD.Studio.EventDescription eventDescription;
        result = FMODUnity.RuntimeManager.SecondaryStudioSystem.getEvent("event:/VO/Welcome", out eventDescription);
        UnityEngine.Debug.Log("Result of getEvent: " + result);

        FMOD.Studio.EventInstance eventInstance;
        result = eventDescription.createInstance(out eventInstance);
        UnityEngine.Debug.Log("Result of createInstance: " + result);

        if (result == FMOD.RESULT.OK && eventInstance.isValid())
        {
            UnityEngine.Debug.Log("Event instance is valid.");
            FMOD.RESULT startResult = eventInstance.start();
            UnityEngine.Debug.Log("Result of starting event: " + startResult);

            FMOD.Studio.PLAYBACK_STATE playbackState;
            eventInstance.getPlaybackState(out playbackState);
            UnityEngine.Debug.Log("Playback state: " + playbackState);

            eventInstance.release();
        }
        else
        {
            UnityEngine.Debug.LogError("Event instance is not valid or creation failed.");
        }
    }
}

```

All of the `result` checks give OK, and when it gets to` eventInstance.Start(),` it also gives OK.

The `getPlaybackState` gives

> Playback state: STARTING  
> UnityEngine.Debug:Log (object)  
> EventOnSecondarySystem:Start () (at Assets/Scripts/EventOnSecondarySystem.cs:44)

However, no sound can be heard at all. Any ideas on what I’m doing wrong?

I do get this warning:

> [FMOD] AsyncCommandBuffer::growBuffer : Growing command buffer to 262144 bytes. Initial command buffer size can be tuned to avoid dynamic growth using Studio::System::setAdvancedSettings()
> 
> UnityEngine.Debug:LogWarning (object)  
> FMODUnity.RuntimeUtils:DebugLogWarning (string) (at Assets/Plugins/FMOD/src/RuntimeUtils.cs:564)  
> FMODUnity.RuntimeManager:DEBUG\_CALLBACK (FMOD.DEBUG\_FLAGS,intptr,int,intptr,intptr) (at Assets/Plugins/FMOD/src/RuntimeManager.cs:108)  
> FMOD.Studio.System:getBus (string,FMOD.Studio.Bus&) (at Assets/Plugins/FMOD/src/fmod\_studio.cs:444)  
> FMODUnity.RuntimeManager:ApplyMuteState () (at Assets/Plugins/FMOD/src/RuntimeManager.cs:1569)  
> FMODUnity.RuntimeManager:Update () (at Assets/Plugins/FMOD/src/RuntimeManager.cs:649)

But I’m not sure if this is related to the sound not playing, or if that is a separate issue.

Any help is greatly appreciated! (Please not that I’m not so super experienced in coding)

---

<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: [October 31, 2024, 1:33am UTC](https://qa.fmod.com/t/trying-to-play-an-event-on-a-secondary-studio-system/22221/2 "2024-10-31T01:33:45Z")

</div>

Is your second system being updated with a call to `SecondaryCoreSystem.update()` in the `RuntimeManager::update()`?
