Search code examples
iphonefmod

Set sample rate in fmod


How do I set up the sample rate in Fmod?

I initiate my event system with the following code. Can I add the sample rate into this method?

result = eventSystem->init(32, FMOD_INIT_NORMAL | FMOD_INIT_ENABLE_PROFILE, NULL, FMOD_EVENT_INIT_NORMAL);

Solution

  • No, to specify the sample rate for the system you need to use System::setSoftwareFormat.

    To do this with the EventSystem, you must create an EventSystem object, then call EventSystem::getSystemObject, with that System object you can call System::setSoftwareFormat specifying the sample rate. All of this happens before you init the EventSystem object.