// 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 }
// 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 }