set_Sound()

IEffect::set_Sound(System::SharedPtr<IAudio>) method

Defined embedded sound for effect. Write IAudio.

virtual void Aspose::Slides::Animation::IEffect::set_Sound(System::SharedPtr<IAudio> value)=0

Remarks

auto presentation = System::MakeObject<Presentation>(u"demo.pptx");
auto slide = presentation->get_Slides()->idx_get(0);

// Gets the effects sequence for the slide
auto effectsSequence = slide->get_Timeline()->get_MainSequence();
for (auto effect : effectsSequence)
{
    if (effect->get_Sound() == nullptr)
    {
        continue;
    }

    // Extracts the effect sound in byte array
    System::ArrayPtr<uint8_t> audio = effect->get_Sound()->get_BinaryData();
}

See Also