I’m trying to get waveform data that I can use to convert the data into colors. The only way I’ve found to add a dsp to an EventInstance is as follows
eventInstance.start(); yield return new WaitForSeconds(0.1f); FMOD.ChannelGroup channel; eventInstance.getChannelGroup(out channel); FMOD.DSP dsp; FMOD.DSP_DESCRIPTION dspDesc = new FMOD.DSP_DESCRIPTION(); dspDesc.read = DSPReadCallback; RuntimeManager.LowlevelSystem.createDSP(ref dspDesc, out dsp); channel.addDSP(0, dsp);
However, doing this causes the first event it attaches a dsp to to not play through to the speakers and the following events all contain pop and cracks. This happens even when no processing occurs in the callback. A secondary issue is that without the hacky coroutine yield statement I get an ERR_STUDIO_NOT_LOADED and no events are played. Am I going about this the wrong way?