Esempio n. 1
0
// HostApi returns information for a requested HostApiType.
func HostApi(apiType HostApiType) (*HostApiInfo, error) {
	hosts, err := HostApis()
	if err != nil {
		return nil, err
	}
	i := C.Pa_HostApiTypeIdToHostApiIndex(C.PaHostApiTypeId(apiType))
	if i < 0 {
		return nil, newError(C.PaError(i))
	}
	return hosts[i], nil
}
Esempio n. 2
0
// HostApiTypeIdToHostApiIndex function as declared in portaudio/portaudio.h:307
func HostApiTypeIdToHostApiIndex(kind HostApiTypeId) HostApiIndex {
	ckind, _ := (C.PaHostApiTypeId)(kind), cgoAllocsUnknown
	__ret := C.Pa_HostApiTypeIdToHostApiIndex(ckind)
	__v := (HostApiIndex)(__ret)
	return __v
}