Ejemplo n.º 1
0
func Volume(channel, volume int) int {
	_channel := (C.int)(channel)
	_volume := (C.int)(volume)
	return (int)(C.Mix_Volume(_channel, _volume))
}
Ejemplo n.º 2
0
func (t *Sound) updateVolume() {
	t.volume = GDefaultVolume * t.defaultVolume * t.volumeFactor3D
	t.volume = t.volume.Clamp01()
	C.Mix_Volume(C.int(t.channel), C.int(t.volume*C.MIX_MAX_VOLUME))
}
Ejemplo n.º 3
0
// Set the volume in the range of 0-128 of a specific channel or chunk.
// If the specified channel is -1, set volume for all channels.
// Returns the original volume.
// If the specified volume is -1, just return the current volume.
func VolumeChannel(channel, volume int) (int) {
  return int(C.Mix_Volume(C.int(channel), C.int(volume)));
}