Example #1
0
func (dev Device) IsExtensionPresent(extName string) (bool, error) {
	val := C.int(C.alcIsExtensionPresent(dev.device, (*C.ALCchar)(C.CString(extName))))
	if val == 1 {
		return true, GetError()
	} else {
		return false, GetError()
	}
}
Example #2
0
File: alc.go Project: nzlov/goal
/*
 * Extension support.
 * Query for the presence of an extension, and obtain any appropriate
 * function pointers and enum values.
 */
func (device *Device) IsExtensionPresent(extname string) bool {
	s := alcString(extname)
	b := goBool(C.alcIsExtensionPresent((*C.ALCdevice)(device), s))
	freeString(s)
	return b
}