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;
_StudioSystem->getLowLevelSystem(&_LowLevelSystem);
//_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)
{
_dsp->setParameterInt(FMOD_DSP_FFT_WINDOWTYPE, FMOD_DSP_FFT_WINDOW_TRIANGLE);
_dsp->setParameterInt(FMOD_DSP_FFT_WINDOWSIZE, _WINDOWSIZE);
_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 !