.\" This manpage content is licensed under Creative Commons .\" Attribution 4.0 International (CC BY 4.0) .\" https://creativecommons.org/licenses/by/4.0/ .\" This manpage was generated from SDL_mixer's wiki page for Mix_Volume: .\" https://wiki.libsdl.org/SDL_mixer/Mix_Volume .\" Generated with SDL/build-scripts/wikiheaders.pl .\" revision 3~git20240319~12fb85e+ds-1 .\" Please report issues in this manpage's content at: .\" https://github.com/libsdl-org/sdlwiki/issues/new .\" Please report issues in the generation of this manpage from the wiki at: .\" https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20Mix_Volume .\" SDL_mixer can be found at https://libsdl.org/projects/SDL_mixer .de URL \$2 \(laURL: \$1 \(ra\$3 .. .if \n[.g] .mso www.tmac .TH Mix_Volume 3 "SDL_mixer 3.0.0" "SDL_mixer" "SDL_mixer3 FUNCTIONS" .SH NAME Mix_Volume \- Set the volume for a specific channel\[char46] .SH SYNOPSIS .nf .B #include \(dqSDL3_mixer/SDL_mixer.h\(dq .PP .BI "int Mix_Volume(int channel, int volume); .fi .SH DESCRIPTION The volume must be between 0 (silence) and .BR MIX_MAX_VOLUME (full volume)\[char46] Note that .BR MIX_MAX_VOLUME is 128\[char46] Values greater than .BR MIX_MAX_VOLUME are clamped to .BR MIX_MAX_VOLUME \[char46] Specifying a negative volume will not change the current volume; as such, this can be used to query the current volume without making changes, as this function returns the previous (in this case, still-current) value\[char46] If the specified channel is -1, this function sets the volume for all channels, and returns _the average_ of all channels' volumes prior to this call\[char46] The default volume for a channel is .BR MIX_MAX_VOLUME (no attenuation)\[char46] .SH FUNCTION PARAMETERS .TP .I channel the channel on set/query the volume on, or -1 for all channels\[char46] .TP .I volume the new volume, between 0 and .BR MIX_MAX_VOLUME , or -1 to query\[char46] .SH RETURN VALUE Returns the previous volume\[char46] If the specified volume is -1, this returns the current volume\[char46] If .BR channel is -1, this returns the average of all channels\[char46] .SH AVAILABILITY This function is available since SDL_mixer 3\[char46]0\[char46]0\[char46]