コード例 #1
0
ファイル: instance.go プロジェクト: golang-lib/go-vlc
// AudioDeviceCount returns the number of devices for audio output. These devices
// are hardware oriented like analog or digital output of sound cards.
func (this *Instance) AudioDeviceCount(output string) (int, error) {
	if this.ptr == nil {
		return 0, syscall.EINVAL
	}

	c := C.CString(output)
	defer C.free(unsafe.Pointer(c))
	return int(C.libvlc_audio_output_device_count(this.ptr, c)), checkError()
}
コード例 #2
0
ファイル: player.go プロジェクト: henrym/go-vlc
// AudioDeviceCount returns the number of devices for audio output. These devices
// are hardware oriented like analog or digital output of sound cards.
func (this *Player) AudioDeviceCount(output string) (int, error) {
	if this.ptr == nil {
		return 0, &VLCError{"Player is nil"}
	}

	c := C.CString(output)
	defer C.free(unsafe.Pointer(c))
	return int(C.libvlc_audio_output_device_count(this.ptr, c)), checkError()
}