Пример #1
0
// AudioInit (https://wiki.libsdl.org/SDL_AudioInit)
func AudioInit(driverName string) error {
	_driverName := C.CString(driverName)
	defer C.free(unsafe.Pointer(_driverName))
	if C.SDL_AudioInit(_driverName) != 0 {
		return GetError()
	}
	return nil
}
Пример #2
0
func AudioInit(name string) error {
	cname := C.CString(name)
	defer C.free(unsafe.Pointer(cname))

	if C.SDL_AudioInit(cname) != 0 {
		return getError()
	}

	return nil
}
Пример #3
0
// AudioInit (https://wiki.libsdl.org/SDL_AudioInit)
func AudioInit(driverName string) int {
	_driverName := C.CString(driverName)
	defer C.free(unsafe.Pointer(_driverName))
	return int(C.SDL_AudioInit(_driverName))
}
Пример #4
0
func AudioInit(driver_name string) int {
	_driver_name := (C.CString)(driver_name)
	return (int)(C.SDL_AudioInit(_driver_name))
}
Пример #5
0
func AudioInit(driver string) bool {
	cdriver := C.CString(driver)
	ret := C.SDL_AudioInit(cdriver)
	C.free(unsafe.Pointer(cdriver))
	return int(ret) != 0
}
Пример #6
0
func AudioInit(drivername string) int {
	driver_name := cstr(drivername)
	defer driver_name.free()
	res := C.SDL_AudioInit(driver_name)
	return int(res)
}