Esempio n. 1
0
// FMOD_RESULT F_API FMOD_ChannelGroup_SetVolume        (FMOD_CHANNELGROUP *channelgroup, float volume);
func (cg *ChannelGroup) SetVolume(volume float64) error {
	var ferr C.FMOD_RESULT
	base.Thread(func() {
		ferr = C.FMOD_ChannelGroup_SetVolume(cg.group, C.float(volume))
	})
	return base.ResultToError(ferr)
}
Esempio n. 2
0
// Sets the volume level linearly.
//
// volume: Linear volume level, default = 1.0.
//
// Volume level can be below 0 to invert a signal and above 1 to amplify the signal. Note that increasing the signal level too far may cause audible distortion.
// "Sound.SetDefaults" can be used to change the default volume for any channels played using that sound.
func (c *ChannelGroup) SetVolume(volume float64) error {
	res := C.FMOD_ChannelGroup_SetVolume(c.cptr, C.float(volume))
	return errs[res]
}