// FMOD_RESULT F_API FMOD_EventGroup_LoadEventData (FMOD_EVENTGROUP *eventgroup, FMOD_EVENT_RESOURCE resource, FMOD_EVENT_MODE mode); func (g *Group) LoadEventData(resource Resource, mode Mode) error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_EventGroup_LoadEventData(g.group, C.FMOD_EVENT_RESOURCE(resource), C.FMOD_EVENT_MODE(mode)) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_EventSystem_GetEventBySystemID(FMOD_EVENTSYSTEM *eventsystem, unsigned int systemid, FMOD_EVENT_MODE mode, FMOD_EVENT **event); func (system *System) GetEventBySystemID(system_id int, mode Mode) (*Event, error) { var ferr C.FMOD_RESULT var event Event base.Thread(func() { ferr = C.FMOD_EventSystem_GetEventBySystemID(system.system, C.uint(system_id), C.FMOD_EVENT_MODE(mode), &event.event) }) err := base.ResultToError(ferr) if err != nil { return nil, err } runtime.SetFinalizer(&event, finalizeEvent) return &event, nil }
// FMOD_RESULT F_API FMOD_EventGroup_GetEventByIndex (FMOD_EVENTGROUP *eventgroup, int index, FMOD_EVENT_MODE mode, FMOD_EVENT **event); func (g *Group) GetEventByIndex(index int, mode Mode) (*Event, error) { var event Event var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_EventGroup_GetEventByIndex(g.group, C.int(index), C.FMOD_EVENT_MODE(mode), &event.event) }) err := base.ResultToError(ferr) if err != nil { return nil, err } event.group = g runtime.SetFinalizer(&event, finalizeGroupEvent) return &event, nil }
// FMOD_RESULT F_API FMOD_EventSystem_GetEventByGUIDString(FMOD_EVENTSYSTEM *eventsystem, const char *guid, FMOD_EVENT_MODE mode, FMOD_EVENT **event); func (system *System) GetEventByGUIDString(guid string, mode Mode) (*Event, error) { var ferr C.FMOD_RESULT var event Event base.Thread(func() { cguid := C.CString(guid) ferr = C.FMOD_EventSystem_GetEventByGUIDString(system.system, cguid, C.FMOD_EVENT_MODE(mode), &event.event) C.free(unsafe.Pointer(cguid)) }) err := base.ResultToError(ferr) if err != nil { return nil, err } runtime.SetFinalizer(&event, finalizeEvent) return &event, nil }
// FMOD_RESULT F_API FMOD_EventGroup_GetEvent (FMOD_EVENTGROUP *eventgroup, const char *name, FMOD_EVENT_MODE mode, FMOD_EVENT **event); func (g *Group) GetEvent(name string, mode Mode) (*Event, error) { var event Event var ferr C.FMOD_RESULT base.Thread(func() { cname := C.CString(name) ferr = C.FMOD_EventGroup_GetEvent(g.group, cname, C.FMOD_EVENT_MODE(mode), &event.event) C.free(unsafe.Pointer(cname)) }) err := base.ResultToError(ferr) if err != nil { return nil, err } event.group = g runtime.SetFinalizer(&event, finalizeGroupEvent) return &event, nil }
// FMOD_RESULT F_API FMOD_MusicSystem_LoadSoundData (FMOD_MUSICSYSTEM *musicsystem, FMOD_EVENT_RESOURCE resource, FMOD_EVENT_MODE mode); func (music *MusicSystem) LoadSoundData(resource Resource, mode Mode) error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_MusicSystem_LoadSoundData(music.system, C.FMOD_EVENT_RESOURCE(resource), C.FMOD_EVENT_MODE(mode)) }) return base.ResultToError(ferr) }