Esempio n. 1
0
func (p *Player) SetVolume(volume int) error {
	if p.player == nil {
		return errors.New("A player must first be initialized")
	}

	C.libvlc_audio_set_volume(p.player, C.int(volume))
	return getError()
}
Esempio n. 2
0
// SetVolume sets the current audio level.
func (this *Player) SetVolume(v int) error {
	if this.ptr == nil {
		return syscall.EINVAL
	}

	C.libvlc_audio_set_volume(this.ptr, C.int(v))
	return checkError()
}
Esempio n. 3
0
// SetVolume sets the current audio level.
func (this *Player) SetVolume(v int) error {
	if this.ptr == nil {
		return &VLCError{"Player is nil"}
	}

	C.libvlc_audio_set_volume(this.ptr, C.int(v))
	return checkError()
}