The Easiest Way to Save and Share Code Snippets on the web

FMOD Event System Initialization

objc | by: jimmcgowan

posted: Feb, 5th 2012 | jump to bottom

// Declared in header
FMOD_EVENTSYSTEM *eventSystem;
FMOD_EVENTGROUP *eventGroup;
 
// Initialize the FMOD event system
FMOD_EventSystem_Create(&eventSystem);
FMOD_EventSystem_Init(eventSystem, 
                      MAX_FMOD_AUDIO_CHANNELS, 
                      FMOD_INIT_NORMAL, 
                      NULL, 
                      FMOD_EVENT_INIT_NORMAL);
 
// Load the FEV file
NSString *fevPath = [[NSBundle mainBundle] 
        pathForResource:@"Squeak" 
                       ofType:@"fev"];
FMOD_EVENTPROJECT *project;
FMOD_EventSystem_Load(eventSystem, 
                      [fevPath UTF8String], 
                      FMOD_EVENT_INIT_NORMAL, 
                      &project);
 
// Get the group that contains the finger drag (sqeak) event
FMOD_EventProject_GetGroup(project, 
                           "FingerDragGroup", 
                           true, 
                           &eventGroup);
37 views