Example #1
0
func GetError() error {
	// alcGetError wants an "ALCvoid" type, which go reports is of type *[0]byte.
	// I figure nil is good enough?
	if errVal := C.alcGetError(nil); errVal == C.ALC_NO_ERROR {
		return nil
	} else {
		return Error{errVal}
	}
}
Example #2
0
File: alc.go Project: Miaque/mojo
// Error returns the last known error from the current device.
func (d *Device) Error() int32 {
	return int32(C.alcGetError(d.d))
}
Example #3
0
File: alc.go Project: nzlov/goal
/*
 * Error support.
 * Obtain the most recent Context error
 */
func (device *Device) GetError() ALCenum {
	return ALCenum(C.alcGetError((*C.ALCdevice)(device)))
}
Example #4
0
func alcGetError(d unsafe.Pointer) int32 {
	dev := (*C.ALCdevice)(d)
	return int32(C.alcGetError(dev))
}
Example #5
0
func (self *Device) getError() uint32 {
	return uint32(C.alcGetError(self.handle))
}