Esempio n. 1
0
func newError(err C.PaError) error {
	switch err {
	case C.paUnanticipatedHostError:
		hostErr := C.Pa_GetLastHostErrorInfo()
		return UnanticipatedHostError{
			HostApiType(hostErr.hostApiType),
			int(hostErr.errorCode),
			C.GoString(hostErr.errorText),
		}
	case C.paNoError:
		return nil
	}
	return Error(err)
}
Esempio n. 2
0
// GetLastHostErrorInfo function as declared in portaudio/portaudio.h:358
func GetLastHostErrorInfo() *HostErrorInfo {
	__ret := C.Pa_GetLastHostErrorInfo()
	__v := NewHostErrorInfoRef(unsafe.Pointer(__ret))
	return __v
}