package hikvoice /* #cgo CFLAGS: -I${SRCDIR}/include -w -g #cgo LDFLAGS: -L${SRCDIR}/libs #cgo LDFLAGS: -lHikVoice -lAudioRender -lHCCore -lhcnetsdk -lhpr #cgo LDFLAGS: -ldl -lm #include #include "Voice.h" */ import "C" import ( "unsafe" ) // SendVoice Send Voice func SendVoice(ip,usrname,passwd,voiceFilePath string) int { cip := C.CString(ip) defer C.free(unsafe.Pointer(cip)) cusrname := C.CString(usrname) defer C.free(unsafe.Pointer(cusrname)) cpasswd := C.CString(passwd) defer C.free(unsafe.Pointer(cpasswd)) cvoiceFilePath := C.CString(voiceFilePath) defer C.free(unsafe.Pointer(cvoiceFilePath)) cRet := C.SendVoice(cip, cusrname, cpasswd, cvoiceFilePath) return int(cRet) }