func LoadMUS(file string) (mus *Music, err error) { _file := C.CString(file) defer C.free(unsafe.Pointer(_file)) mus = (*Music)(unsafe.Pointer(C.Mix_LoadMUS(_file))) if mus == nil { err = sdl.GetError() } return }
func loadMusic(name string) *Music { cname := C.CString(name) music := C.Mix_LoadMUS(cname) C.free(unsafe.Pointer(cname)) if music == nil { panic(fmt.Sprintf("Unable to load Music file (%v): %v", name, util.GetMixError())) } return New(name, music) }
// Loads a music file to use. func LoadMUS(file string) *Music { cfile := C.CString(file) cmusic := C.Mix_LoadMUS(cfile) C.free(unsafe.Pointer(cfile)) if cmusic == nil { return nil } return &Music{cmusic} }
func LoadMUS(file string) *Music { _file := (C.CString)(file) return (*Music)(unsafe.Pointer(C.Mix_LoadMUS(_file))) }
func LoadMUS(file string) *Music { _file := C.CString(file) defer C.free(unsafe.Pointer(_file)) return (*Music)(unsafe.Pointer(C.Mix_LoadMUS(_file))) }
func LoadMUS(res string) (* C.Mix_Music) { cres := cstr(res) ; defer cres.free() return C.Mix_LoadMUS(cres) }