// AudioDeviceId returns the id of an audio device. func (this *Instance) AudioDeviceId(output string, device int) (s string, err error) { if this.ptr == nil { return "", syscall.EINVAL } c := C.CString(output) defer C.free(unsafe.Pointer(c)) if r := C.libvlc_audio_output_device_id(this.ptr, c, C.int(device)); r != nil { s = C.GoString(r) C.free(unsafe.Pointer(r)) return } return "", checkError() }
// AudioDeviceId returns the id of an audio device. func (this *Player) AudioDeviceId(output string, device int) (s string, err error) { if this.ptr == nil { return "", &VLCError{"Player is nil"} } c := C.CString(output) defer C.free(unsafe.Pointer(c)) if r := C.libvlc_audio_output_device_id(this.ptr, c, C.int(device)); r != nil { s = C.GoString(r) C.free(unsafe.Pointer(r)) return } return "", checkError() }