public List <FmodEvent> loadEventsFromFile(string assetPath, string assetName, FmodEventAsset asset) { FMOD.EventGroup eventgroup = null; FMOD.RESULT result = FMOD.RESULT.OK; List <FmodEvent> events = new List <FmodEvent>(); List <FmodEventGroup> eventGroups = new List <FmodEventGroup>(); int numGroups = 0; FmodEventGroup toAdd = null; FMOD.EVENT_LOADINFO loadInfo = new FMOD.EVENT_LOADINFO(); FMOD.EventProject project = null; _loadFile(assetPath, assetName, ref loadInfo, ref project); _getSoundBankNames(asset); FMOD.EVENT_PROJECTINFO projectInfo = new FMOD.EVENT_PROJECTINFO(); project.getInfo(ref projectInfo); asset.setProjectName(new string(projectInfo.name)); result = project.getNumGroups(ref numGroups); ERRCHECK(result); for (int i = 0; i < numGroups; i++) { result = project.getGroupByIndex(i, false, ref eventgroup); ERRCHECK(result); toAdd = FmodEventGroup.CreateInstance("FmodEventGroup") as FmodEventGroup; toAdd.Initialize(eventgroup, null, asset); eventGroups.Add(toAdd); events.AddRange(toAdd.getAllEvents()); } asset.setEventGroups(eventGroups); loadReverbsFromFile(asset); return(events); }
public void releaseAllEventsFromGroup(FmodEventGroup grp) { if (grp != null) { foreach (FmodEvent evt in grp.getAllEvents()) { if (m_eventPoolManager.eventPoolExists(evt)) { m_eventPoolManager.getEventPool(evt).releaseAllHandles(); } } } }
public int getNumberRunningInstancesInGroup(FmodEventGroup grp) { if (grp == null) { return(0); } int total = 0; foreach (FmodEvent evt in grp.getAllEvents()) { if (m_eventPoolManager.eventPoolExists(evt)) { total += m_eventPoolManager.getEventPool(evt).getNumberRunningInstances(); } } return(total); }
public int getNumberRunningInstancesInGroup(FmodEventGroup grp) { if (grp == null) { return (0); } int total = 0; foreach (FmodEvent evt in grp.getAllEvents()) { if (m_eventPoolManager.eventPoolExists(evt)) { total += m_eventPoolManager.getEventPool(evt).getNumberRunningInstances(); } } return (total); }