[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
int Mix_Volume(int channel, int volume)
-1
will set the volume for all allocated channels.
Set the volume for any allocated channel. If channel is -1
then all channels at are set at once. The volume is applied during the final mix, along with the sample volume. So setting this volume to 64 will halve the output of all samples played on the specified channel. All channels default to a volume of 128, which is the max. Newly allocated channels will have the max volume set, so setting all channels volumes does not affect subsequent channel allocations.
Returns: current volume of the channel. If channel is -1, the average volume is returned.
|
See Also:
4.2.7 Mix_VolumeChunk,
4.5.9 Mix_VolumeMusic