To enable reverb settings in Fmod Designer click on “Window” > “Reverb Defs”. Select your reverb and click on the play button. The reverb is now active and the project can be built. Notice that for the time being Fmod Designer requires you to always activate this whenever you open your project. This is not done automatically. The name of your reverb, in this case “Reverb00″ is used later on in the code.
To activate the reverb in the code the follow code needs to be added:
#import "mySoundProject.h"
@implementation SoundManager
void ERRCHECK(FMOD_RESULT result)
{
if (result != FMOD_OK)
{
//fprintf(stderr, "FMOD error! (%d) %s\n", result, FMOD_ErrorString(result));
exit(-1);
}
}
- (id)initWithString:(NSString*)selectedProfile
{
system = NULL;
eventSystem = NULL;
FMOD_RESULT result = FMOD_OK;
char buffer[200] = {0};
FMOD_REVERB_PROPERTIES reverb00;
result = FMOD::EventSystem_Create(&eventSystem);
ERRCHECK(result);
result = eventSystem->init(32, FMOD_INIT_NORMAL | FMOD_INIT_ENABLE_PROFILE | FMOD_INIT_DISTANCE_FILTERING, NULL, FMOD_EVENT_INIT_NORMAL);
ERRCHECK(result);
[[NSString stringWithFormat:@"%@/mySoundProject.fev", [[NSBundle mainBundle] resourcePath]] getCString:buffer maxLength:200 encoding:NSASCIIStringEncoding];
result = eventSystem->load(buffer, NULL, NULL);
ERRCHECK(result);
result = eventSystem->getReverbPreset("REVERB00", &reverb00); // Same name as in Fmod Designer.
ERRCHECK(result);
result = eventSystem->setReverbProperties(&reverb00);
ERRCHECK(result);
result = eventSystem->getGroup("MySoundProject/MySoundProject", FMOD_EVENT_DEFAULT, &group);
ERRCHECK(result);
























Tim 14:18 on February 13, 2013 Permalink
Hello!
Thank you for a great example!
Would it be possible for you to post an full example of sending from unity to processing? I tried this code, but it seems that you need more code in order to get it to work. I’m new at this so that is why im asking. Thank you!