set_Sound()

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

Defined embedded sound for effect. Write IAudio.

void Aspose::Slides::Animation::Effect::set_Sound(System::SharedPtr<IAudio> value) override

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