// Different than the FMOD definition of GetCues - instead this returns a // slice of all matching cues. Pass in the empty string to match all cues. func (music *MusicSystem) GetCues(filter string) ([]MusicEntity, error) { var it C.FMOD_MUSIC_ITERATOR var cfilter *C.char if filter != "" { cfilter = C.CString(filter) } else { cfilter = nil } var ents []MusicEntity var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_MusicSystem_GetCues(music.system, &it, cfilter) if base.ResultToError(ferr) != nil { return } for unsafe.Pointer(it.value) != unsafe.Pointer(uintptr(0)) { ent := MusicEntity{C.GoString(it.value.name), MusicId(it.value.id)} ents = append(ents, ent) ferr = C.FMOD_MusicSystem_GetNextCue(music.system, &it) if base.ResultToError(ferr) != nil { return } } }) if filter != "" { C.free(unsafe.Pointer(cfilter)) } return ents, base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_MusicSystem_Reset (FMOD_MUSICSYSTEM *musicsystem); func (music *MusicSystem) Reset() error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_MusicSystem_Reset(music.system) }) return base.ResultToError(ferr) }
func (s *System) SetOutput(output OutputType) error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_System_SetOutput(s.system, C.FMOD_OUTPUTTYPE(output)) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_EventParameter_SetValue (FMOD_EVENTPARAMETER *eventparameter, float value); func (p *Param) SetValue(value float64) error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_EventParameter_SetValue(p.param, C.float(value)) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_MusicSystem_PromptCue (FMOD_MUSICSYSTEM *musicsystem, FMOD_MUSIC_CUE_ID id); func (music *MusicSystem) PromptCue(cue MusicEntity) error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_MusicSystem_PromptCue(music.system, C.FMOD_MUSIC_CUE_ID(cue.Id())) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_System_Init (FMOD_SYSTEM *system, int maxchannels, FMOD_INITFLAGS flags, void *extradriverdata); func (s *System) Init(max_channels int, flags InitFlags, extra_driver_data interface{}) error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_System_Init(s.system, C.int(max_channels), C.FMOD_INITFLAGS(flags), unsafe.Pointer(uintptr(0))) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_Event_SetVolume (FMOD_EVENT *event, float volume); func (e *Event) SetVolume(volume float64) error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_Event_SetVolume(e.event, C.float(volume)) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_MusicSystem_SetVolume (FMOD_MUSICSYSTEM *musicsystem, float volume); func (music *MusicSystem) SetVolume(volume float64) error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_MusicSystem_SetVolume(music.system, C.float(volume)) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_Channel_SetPaused (FMOD_CHANNEL *channel, FMOD_BOOL paused); func (c *Channel) SetPaused(paused bool) error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_Channel_SetPaused(c.channel, makeFmodBool(paused)) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_Channel_SetChannelGroup (FMOD_CHANNEL *channel, FMOD_CHANNELGROUP *channelgroup); func (c *Channel) SetChannelGroup(group *ChannelGroup) error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_Channel_SetChannelGroup(c.channel, group.group) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_Channel_Stop (FMOD_CHANNEL *channel); func (c *Channel) Stop() error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_Channel_Stop(c.channel) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_ChannelGroup_AddGroup (FMOD_CHANNELGROUP *channelgroup, FMOD_CHANNELGROUP *group); func (cg *ChannelGroup) AddGroup(group *ChannelGroup) error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_ChannelGroup_AddGroup(cg.group, group.group) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_ChannelGroup_SetMute (FMOD_CHANNELGROUP *channelgroup, FMOD_BOOL mute); func (cg *ChannelGroup) SetMute(mute bool) error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_ChannelGroup_SetMute(cg.group, makeFmodBool(mute)) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_ChannelGroup_SetPitch (FMOD_CHANNELGROUP *channelgroup, float pitch); func (cg *ChannelGroup) SetPitch(pitch float64) error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_ChannelGroup_SetPitch(cg.group, C.float(pitch)) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_Event_SetPaused (FMOD_EVENT *event, FMOD_BOOL paused); func (event *Event) SetPaused(paused bool) error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_Event_SetPaused(event.event, makeFmodBool(paused)) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_MusicPrompt_End (FMOD_MUSICPROMPT *musicprompt); func (p *Prompt) End() error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_MusicPrompt_End(p.prompt) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_Event_SetMute (FMOD_EVENT *event, FMOD_BOOL mute); func (event *Event) SetMute(mute bool) error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_Event_SetMute(event.event, makeFmodBool(mute)) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_MusicSystem_SetMute (FMOD_MUSICSYSTEM *musicsystem, FMOD_BOOL mute); func (music *MusicSystem) SetMute(mute bool) error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_MusicSystem_SetMute(music.system, makeFmodBool(mute)) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_Event_Start (FMOD_EVENT *event); func (e *Event) Start() error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_Event_Start(e.event) }) return base.ResultToError(ferr) }
// 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_Event_Stop (FMOD_EVENT *event, FMOD_BOOL immediate); func (e *Event) Stop(immediate bool) error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_Event_Stop(e.event, makeFmodBool(immediate)) }) return base.ResultToError(ferr) }
// FMOD_RESULT FMOD_System_Close (FMOD_SYSTEM *system); func (s *System) Close() error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_System_Close(s.system) }) return base.ResultToError(ferr) }
// 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) }
// FMOD_RESULT F_API FMOD_ChannelGroup_SetVolume (FMOD_CHANNELGROUP *channelgroup, float volume); func (cg *ChannelGroup) SetVolume(volume float64) error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_ChannelGroup_SetVolume(cg.group, C.float(volume)) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_EventSystem_Update (FMOD_EVENTSYSTEM *eventsystem); func (system *System) Update() error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_EventSystem_Update(system.system) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_EventSystem_Init (FMOD_EVENTSYSTEM *eventsystem, int maxchannels, FMOD_INITFLAGS flags, void *extradriverdata, FMOD_EVENT_INITFLAGS eventflags); func (system *System) Init(max_channels int, init_flags InitFlags, extradriverdata interface{}, event_init_flags EventInitFlags) error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_EventSystem_Init(system.system, C.int(max_channels), C.FMOD_INITFLAGS(init_flags), unsafe.Pointer(uintptr(0)), C.FMOD_EVENT_INITFLAGS(event_init_flags)) }) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_EventSystem_GetVersion (FMOD_EVENTSYSTEM *eventsystem, unsigned int *version); func (system *System) GetVersion() (uint32, error) { var ferr C.FMOD_RESULT var version C.uint base.Thread(func() { ferr = C.FMOD_EventSystem_GetVersion(system.system, &version) }) return uint32(version), base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_EventSystem_Release (FMOD_EVENTSYSTEM *eventsystem); func (system *System) Release() error { var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_EventSystem_Release(system.system) }) runtime.SetFinalizer(system, nil) return base.ResultToError(ferr) }
// FMOD_RESULT F_API FMOD_EventSystem_GetNumEvents (FMOD_EVENTSYSTEM *eventsystem, int *numevents); func (system *System) GetNumEvents() (int, error) { var ferr C.FMOD_RESULT var num_events C.int base.Thread(func() { ferr = C.FMOD_EventSystem_GetNumEvents(system.system, &num_events) }) return int(num_events), base.ResultToError(ferr) }
func (s *System) GetOutput() (OutputType, error) { var output_type C.FMOD_OUTPUTTYPE var ferr C.FMOD_RESULT base.Thread(func() { ferr = C.FMOD_System_GetOutput(s.system, &output_type) }) return OutputType(output_type), base.ResultToError(ferr) }