Hi there I am currently having issue with a getMeterInfo script, for the part of getting the bus channel group suddenly stopped working even though it was working perfectly fine before.
Below is the warning It showed. “Only Level” is the metering script which I will attach. It is detecting a group which a programmer instrument of player talking live is sending into.
This is the script.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using FMOD;
using FMODUnity;
using FMOD.Studio;
public class OnlyLevel : MonoBehaviour
{
FMOD.ChannelGroup playerGroup;
FMOD.DSP playerdsp;
FMOD.DSP_METERING_INFO playerLevel = new FMOD.DSP_METERING_INFO();
public float onlyLevel;
public float whisperLevel;
void Start()
{
FMOD.Studio.Bus playerBus = FMODUnity.RuntimeManager.GetBus("bus:/ONLY");
playerBus.getChannelGroup(out playerGroup);
playerGroup.getDSP(0, out playerdsp);
playerdsp.setMeteringEnabled(true, true);
}
void Update()
{
playerdsp.getMeteringInfo(new IntPtr(), out playerLevel);
onlyLevel = playerLevel.rmslevel[0] + playerLevel.rmslevel[1];
}
}
I have found some forums about the channel group not being created yet, and to use method such as flushCommands() or lockChannelGroup(). However, I have a hard time understanding the concepts as well as how to implement them. Would love to have some insight!