carb::audio::PeakVolumes
Defined in carb/audio/IAudioData.h
-
struct PeakVolumes
used to retrieve the peak volume information for a sound data object.
This contains one volume level per channel in the stream and the frame in the stream at which the peak occurs.
Public Members
-
size_t channels
the number of channels with valid peak data in the arrays below.
-
size_t frame[kMaxChannels]
the frame that each peak volume level occurs at for each channel.
This will be the first frame this peak volume level occurs at if it is reached multiple times in the stream.
-
float peak[kMaxChannels]
the peak volume level that is reached for each channel in the stream.
This will be in the range [0.0, 1.0]. This information can be used to normalize the volume level for a sound.
-
size_t peakFrame
the frame that the overall peak volume occurs at in the sound.
-
float peakVolume
the peak volume among all channels of data.
This is simply the maximum value found in the peak table.
-
size_t channels