0
0

I want to set the sample rate of sounds triggered by the event system. The only method I found is setSoftwareFormat but it seems that I have to set up system and init it. Is that right? Do I have to update the system after this or should all files set the sample rate to 44?

[code:2evso3nu] FMOD_RESULT result = FMOD_OK;
char buffer[200] = {0};
result = FMOD::System_Create(&system);
ERRCHECK(result);

result = system->setSoftwareFormat(44000, FMOD_SOUND_FORMAT_PCMFLOAT, 0,0,FMOD_DSP_RESAMPLER_LINEAR);
ERRCHECK(result);

result = system->init(32, FMOD_INIT_NORMAL | FMOD_INIT_ENABLE_PROFILE, NULL);
ERRCHECK(result);

result = FMOD::EventSystem_Create(&eventSystem); 
ERRCHECK(result);

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

[/code:2evso3nu]

With this code I get the following error: FMOD error! (60) Error initializing output device.

  • You must to post comments
0
0

The FMOD mixer will run at the same samplerate as the output device on the platform. Why do you want to change the sample rate?

  • You must to post comments
0
0

I see. It was a requirement from the sound designer to set it to 44. I will check why. Thank you!

  • You must to post comments
0
0

you should use 44100 not 44000 , but on windows this would work without a problem. What operating system and output mode are you using?

  • You must to post comments
0
0

I am developing on Mac for iPhone 4.

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.