VolumeValue

AudioFrame.VolumeValue property

Returns or sets the audio volume in percents. Read/write Single.

public float VolumeValue { get; set; }

Examples

Example:

[C#]
using (Presentation pres = new Presentation())
{
    IAudio audio = pres.Audios.AddAudio(File.ReadAllBytes("sampleaudio.mp3"));
    IAudioFrame audioFrame = pres.Slides[0].Shapes.AddAudioFrameEmbedded(50, 50, 100, 100, audio);

    // Set the audio volume for 85%
    audioFrame.VolumeValue = 85f;

    pres.Save("AudioFrameValue_out.pptx", SaveFormat.Pptx);
}

See Also