Updated FMOD API C++ Functions Help

Hi team,

I’m working on building a FMOD API framework for C++ and I found a helpful tutorial to get started, but it appears in recent FMOD updates, there have been certain functions removed/changed. For reference, the tutorial was from 2016 and I’m using FMOD 2.02.25.

I attempted to fix using the FMOD API release notes, but was unsuccessful. Could someone with a more seasoned eye help me debug/explain what I did wrong in these two parameter-related functions please?

void CAudioEngine::GetEventParameter(const string& strEventName, const string& strParameterName, float* parameter) {
    auto tFoundIt = sgpImplementation->mEvents.find(strEventName);
    if (tFoundIt == sgpImplementation->mEvents.end())
        return;
    FMOD::Studio::EventInstance* pParameter = NULL;
    CAudioEngine::ErrorCheck(tFoundIt->second->getParameterByName(strParameterName.c_str(), &pParameter));
    CAudioEngine::ErrorCheck(pParameter->getParameterByName(parameter));
}

void CAudioEngine::SetEventParameter(const string& strEventName, const string& strParameterName, float fValue) {
    auto tFoundIt = sgpImplementation->mEvents.find(strEventName);
    if (tFoundIt == sgpImplementation->mEvents.end())
        return;
    FMOD::Studio::EventInstance* pParameter = NULL;
    CAudioEngine::ErrorCheck(tFoundIt->second->getParameterByName(strParameterName.c_str(), &pParameter));
    CAudioEngine::ErrorCheck(pParameter->setParameterByName(fValue));
}

Attaching error list as well.

Thank you!
Brandon

getParameterByName needs to be called on a FMOD Event, with the second parameter being a float reference as the returned parameters value.