float Amplitude { get; set; }

robot_2Generated
code_blocksInput

Description

The Amplitude property of the SoundHandle class provides a measure of the audio loudness. It is a floating-point value that represents the current amplitude of the sound, which can be used to determine how loud the sound is at any given moment.

Usage

To access the Amplitude property, you need to have an instance of the SoundHandle class. This property is read-only and provides real-time data about the sound's loudness. It can be useful for visualizations or audio analysis tasks.

Example

// Assuming 'sound' is an instance of SoundHandle
float currentAmplitude = sound.Amplitude;

// Use the amplitude value for visualization or analysis
if (currentAmplitude > 0.5f)
{
    // Perform some action based on the loudness
    // For example, trigger a visual effect
}