示例#1
0
文件: player.go 项目: jteeuwen/go-vlc
// SetMute sets mute mode to the specified value.
func (this *Player) SetMute(toggle bool) error {
	if this.ptr == nil {
		return syscall.EINVAL
	}

	if toggle {
		C.libvlc_audio_set_mute(this.ptr, 1)
	} else {
		C.libvlc_audio_set_mute(this.ptr, 0)
	}

	return checkError()
}
示例#2
0
文件: player.go 项目: henrym/go-vlc
// SetMute sets mute mode to the specified value.
func (this *Player) SetMute(toggle bool) error {
	if this.ptr == nil {
		return &VLCError{"Player is nil"}
	}

	if toggle {
		C.libvlc_audio_set_mute(this.ptr, 1)
	} else {
		C.libvlc_audio_set_mute(this.ptr, 0)
	}

	return checkError()
}