audio.getMaxVolume()

Type Function
Library audio.*
Return value Number
Revision 2017.3060
Keywords audio, volume, max volume
See also audio.getVolume()
audio.setMaxVolume()
audio.setVolume()

Overview

Gets the max volume for a specific channel. There is no max volume for the master volume.

This function returns the channel max volume if requesting a channel, or the average max volume across all channels if { channel=0 } is specified.

Syntax

audio.getMaxVolume( { channel=c } )
channel (optional)

Number. The channel number you want to get the max volume on. Valid channels are 1 to the maximum number of channels (currently 32). Specifying 0 will return the average volume across all channels.

Example

local channel1MaxVolume = audio.getMaxVolume( { channel=1 } )