VCA Get Volume

Hello!

This function is incredibly confusing. What “volume” variables do I need to pass into this function to get the current VCA volume?

image

Almost all functions in the FMOD API return an FMOD_RESULT error code, indicating which error, if any, has occured. Information passed out by functions is passed out by reference, using the pointers you pass in to the function.

As per our documentation, VCA::getVolume requires you to pass in pointers to two floats, like so:

float volume;
float finalVolume;
MasterVCA->getVolume(&volume, &finalVolume);

volume is the value set using the VCA::setVCA function, and finalvolume is the VCA’s actual volume value after all internal calculation, which includes the volume you set via the API, as well as any automation and modulation. Which float value to return from your function will depend on which of these you actually need.