Targeting a specific bus with ScriptUsageVideoPlayback not working

I’ve taken the ScriptUsageVideoPlayback and modified it slightly to target a specific bus instead of the master channel group. Below is what I’m currently doing:

if (!mChannel.hasHandle() && mTotalSamplesWritten > mAdjustedLatencySamples)
{
    Bus bus = FMODUnity.RuntimeManager.GetBus(fmodBusPath);
    
    AudioManager.CheckResult(bus.lockChannelGroup());
    AudioManager.CheckResult(RuntimeManager.StudioSystem.flushCommands());
    AudioManager.CheckResult(bus.getChannelGroup(out FMOD.ChannelGroup group));
    AudioManager.CheckResult(RuntimeManager.CoreSystem.playSound(mSound, group, false, out mChannel));
    AudioManager.CheckResult(mChannel.setVolume(_volume));
    AudioManager.CheckResult(bus.unlockChannelGroup());
}

The audio still plays, just like it did with the master channel group but it does not appear to target the bus. When profiling the bus does not show any audio coming through and no amount of volume manipulation has an impact.

I’m not entirely sure what I’m doing wrong above or what else I can dig into to try to figure out why it doesn’t appear to work.

The bus and group above do return as valid, I just removed the checks for clarity.

Hi,

Thanks for the code and the info, could I please grab your FMOD versions?

Using your code with 2.03.13 I was able to pass the audio to my VideoBus

I did notice that it wasn’t being recorded in the profiler however.

If you connect LU (FMOD Studio | Profiling) are you able to see the audio coming through your fmodBusPath?

This particular project is on 2.02.21. Upgrading is a little tricky of a proposition (release is close) so I’m a little hopeful that’s not the solution.

I’ve created an isolated scene with just a video player so there’s no other noise and yea Live Update does not show any audio.

The bus I’m targeting does matter. In that if I give an invalid bus path I get the bus not found exception. However it doesn’t matter which bus I target. Same result of not seeing the Live Update and not able to control the volume of the video player with a VCA.

Thank you for the info, I was able to reproduce the issue.

Could you try removing the bus.unlockChannelGroup() call, and cache the bus to be unlocked at the end of the video or scene. I think it is being stopped as part of our virtualization system.