# Voice chat problem

**URL:** <https://qa.fmod.com/t/voice-chat-problem/16949>\
**Category:** Unity\
**Tags:** unity, csharp\
**Created:** [March 26, 2021, 7:56pm UTC](https://qa.fmod.com/t/voice-chat-problem/16949 "2021-03-26T19:56:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicho97](https://avatars.discourse-cdn.com/v4/letter/n/a587f6/32.png) [@Nicho97](https://qa.fmod.com/u/Nicho97)\
**Post date:** [March 26, 2021, 7:56pm UTC](https://qa.fmod.com/t/voice-chat-problem/16949/1 "2021-03-26T19:56:19Z")

</div>

Hi,

I working on a project where we have a voice chat, and all the voices are handled by FMOD.  
I have a question about the creation and playing of the sound from the CORE level.  
How do We can load all the sounds created on a BUS?  
This will solve our problem of return on the speaking…

```
    FMODLib.MODE soundMode = FMODLib.MODE.OPENUSER | 
    FMODLib.MODE.LOOP_NORMAL;            
    res = FMODUnity.RuntimeManager.CoreSystem.createSound("Photon AudioOut", soundMode, ref exinfo, out sound);
    if (res != FMODLib.RESULT.OK)
    {
        Error = "failed to createSound: " + res;
        logger.LogError(logPrefix + Error);
        return;
    }
    
    voiceReciveBus = FMODUnity.RuntimeManager.GetBus("bus:/Voices/VoiceReceive");
    voiceReciveBus.getChannelGroup(out voiceReciveChannel);

    res = coreSystem.playSound(sound, voiceReciveChannel, false, out channel);      
    channel.getChannelGroup(out FMODLib.ChannelGroup cg);
    if (res != FMODLib.RESULT.OK)
    {
        Error = "failed to playSound: " + res;
        logger.LogError(logPrefix + Error);
        return;
    }

```

This code works fine but on the mixer we get nothing…

I hope to find a solution.  
Kind regard,

Nicholas

---

<div class="post-metadata">

**Author:** ![vittix](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/vittix/32/2065_2.png) [@vittix](https://qa.fmod.com/u/vittix)\
**Post date:** [March 29, 2021, 4:05pm UTC](https://qa.fmod.com/t/voice-chat-problem/16949/2 "2021-03-29T16:05:57Z")

</div>

we’re working and got stuck on a similar case any hint about it would be appreciated.

---

<div class="post-metadata">

**Author:** ![euginho](https://avatars.discourse-cdn.com/v4/letter/e/f9ae1b/32.png) [@euginho](https://qa.fmod.com/u/euginho)\
**Post date:** [March 29, 2021, 4:58pm UTC](https://qa.fmod.com/t/voice-chat-problem/16949/3 "2021-03-29T16:58:14Z")

</div>

Same problem here!

---

<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:** [April 1, 2021, 5:19am UTC](https://qa.fmod.com/t/voice-chat-problem/16949/4 "2021-04-01T05:19:22Z")

</div>

Ideally you don’t want to be digging into the Core API of Studio objects, but you should be able to use an event containing a programmer instrument. This will handle the issue of attaching your Core level sound to the Studio System.

[FMOD - Scripting Examples | Programmer Sounds](https://fmod.com/resources/documentation-unity?version=2.1&page=examples-programmer-sounds.html)

---

<div class="post-metadata">

**Author:** ![alextagtal](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@alextagtal](https://qa.fmod.com/u/alextagtal)\
**Post date:** [October 3, 2024, 12:34pm UTC](https://qa.fmod.com/t/voice-chat-problem/16949/5 "2024-10-03T12:34:12Z")

</div>

Alright so I was trying to do the same thing ( I am using Photon Voice + FMOD)

This is the correct way to do this

```auto
            FMODLib.GUID busGUID = FMODLib.GUID.Parse("GUID HERE (GET IT FROM FMOD STUDIO MIXER");
            FMODLib.Studio.Bus targetBus;
            FMODUnity.RuntimeManager.StudioSystem.getBusByID(busGUID, out targetBus);
            var lockResult = targetBus.lockChannelGroup();
            FMODUnity.RuntimeManager.StudioSystem.flushCommands();
            targetBus.getChannelGroup(out var busChannelGroup);
            FMODLib.RESULT res = coreSystem.playSound(sound, busChannelGroup, false, out channel);

```

I am not sure why it works this way and not the one you wrote but it does

Best,  
Alex
