Hello
I’m trying to find out the state of the music that is playing.
With the below code, it always reports back as PLAYBACK_STATE.STOPPED. I would expect the second log message to tell me it is PLAYBACK_STATE.PLAYING.
What am I doing wrong here?
private FMOD.Studio.EventInstance music;
private FMOD.Studio.PLAYBACK_STATE musicPlaybackState;
void Start ()
{
music = FMOD_StudioSystem.instance.GetEvent ("event:/Music");
music.getPlaybackState (out musicPlaybackState);
Debug.Log ("state: " + musicPlaybackState);
music.start ();
Debug.Log ("state: " + musicPlaybackState);
}
Thanks,
Jeroen