FMOD
ReactionalFmodCallback
Sometimes you might opt to use Reactional in tandem with a middleware such as FMOD. Reactional generates a PCM buffer, and this buffer can be piped into any audio system. The easiest way to accomplish this is with a Programmer instrument, in FMOD Studio.
In order to send audio into this programmer instrument, please implement this script in Unity.
- Create a new event (Reactional/ReactionalInput)
- Add a
programmer instrument
.- Select and make sure it is set to
Async
, andLooping
.- Add a
Sustain Point
- Right click on the event output meter and change output mode to Stereo (else it might default to mono)
ReactionalFmodCallback
using System;
using UnityEngine;
using System.Runtime.InteropServices;
using FMOD.Studio;
using FMODUnity;
using Reactional.Core;
using FMOD;
class ReactionalFmodCallback : MonoBehaviour
{
public FMODUnity.EventReference eventName;
// ... (click to expand)