Exemplo n.º 1
0
// GetDeviceCount returned the device count
func (af *AFInfo) GetDeviceCount() (int, error) {
	var cnt int
	aferr := C.af_get_device_count((*C.int)(unsafe.Pointer(&cnt)))
	if aferr != 0 {
		return 0, ErrGetDeviceCount
	}
	af.Count = cnt
	return cnt, nil
}
Exemplo n.º 2
0
// GetDeviceCount returned the device count
func GetDeviceCount() (count int, e error) {
	e = af_call(C.af_get_device_count((*C.int)(unsafe.Pointer(&count))))
	return
}