Efficient way of pausing playback

Hello.
While I know my way around Unity, I’m completely new to fmod. I have played around with the Unity integration today and got stuck trying to pause/resume emitters. I need to pause certain emitters when the player toggles the pause menu to prevent their sounds from getting out of sync.
I was quite surprised to find out that emitters only have StartEvent() and Stop() methods, but no Play()/Pause() ones.

Anyway, eventually I got a working solution, but looking at it I feel like there must be an easier, more efficient way of doing this.

//...
FMOD_StudioEventEmitter emitter = GetComponent<FMOD_StudioEventEmitter>();
FMOD_StudioSystem audioSystem = FMOD_StudioSystem.instance;
FMOD.GUID guid;
FMOD.Studio.EventInstance[] instance;
FMOD.Studio.EventDescription eventDescription;

audioSystem.System.lookupID(emitter.asset.path, out guid);
audioSystem.System.getEvent(guid, FMOD.Studio.LOADING_MODE.BEGIN_NOW, out eventDescription);
eventDescription.getInstanceList(out instance);
instance[0].setPaused(true);    // Accessing at index 0 is just a placeholder for testing
//...

It basically takes me 8 lines of code to access the instance. Is there a shorter way?
My plan is to have a static class that holds a list of all the instances that need to be paused. Whenever the player hits the pause key I could just iterate through it to pause all of them easily.
Sorry if this is a dumb question with an obvious answer, but neither Google nor the API documentation where of much help.
I hope anyone here can help me. Thanks.

I know the OP was 7 years ago and FMOD has undoubtedly changed in that time, but it was a relevant question for me just now.

My solution is:

var emitter = GetComponent<FMODUnity.StudioEventEmitter>();
var instance = emitter.EventInstance;
instance.setPaused(true);

In my case, I add the following component to a GameObject and drag references to all the SFX & Music emitters that need pausing.

public class FMODPause : MonoBehaviour
{
	public FMODUnity.StudioEventEmitter[] studioEventEmitters;

	public void Pause(bool state)
	{
		foreach (var emitter in studioEventEmitters)
		{
			var instance = emitter.EventInstance;
			instance.setPaused(state);
		}
	}
}

1 Like