Getting an instance channel group or channel

Hello Everyone,
I am using fmod and ue4 c++ and would like to apply a dsp effect on a channelgroup but I can’t seem to find said channelgroup depending on the event am playing.
Basicaly, I have a function which is :

void UAudioAnalyzer::StartSound(UFMODEvent* InEvent)
	FFMODEventInstance InstanceWrapper = UFMODBlueprintStatics::PlayEvent2D(GetWorld(),InEvent,true);
	_StudioSystem = IFMODStudioModule::Get().GetStudioSystem(EFMODSystemContext::Runtime);
	FMOD::Studio::EventInstance* Instance = InstanceWrapper.Instance;


	//_LowLevelSystem->getChannel(0,&_channel); //putting id 0 is getting smtg random.
	Instance->getChannelGroup(&_channelGroup); //does not return anything
     	if (_channel)

	_LowLevelSystem->createDSPByType(FMOD_DSP_TYPE_FFT, &_dsp);
	if (_dsp)
		_channel->addDSP(0, _dsp);
		_dsp->setActive(true); //c'est vmt a foutre la ???

It has a blueprint type of event as input, and I want to apply a dsp to its group. The getChannelGroup function from the instancewrapper.instance does not return anything. And if I simply get the channel with id “0”. I get something but it’s not relevant (it’s not the master group I guess, and its not being used).

Do anyone have a clue on how I could get the relevant channel and apply a dsp to it ?
Thanks a lot !

You should check the FMOD_RESULT returned from the FMOD functions, Instance->getChannelGroup will likely be returning FMOD_ERR_STUDIO_NOT_LOADED.

Until the event instance has been fully created this function will return FMOD_ERR_STUDIO_NOT_LOADED.

This is because the Event Instance creation and starting are asynchronous and require time to process. You can query the playback state using EventInstance::getPlaybackState, once the state becomes FMOD_STUDIO_PLAYBACK_PLAYING the channelgroup will be available.

Thanks for the answer, didn’t have the time to double check but I am using the master group from the low level system, which also works fine for now. Since I was calling play and asking for the group 2 lines apart that’s most likely the issue I had !