AudioFrame

AudioFrame class

Represents an audio clip on a slide.

class AudioFrame : public Aspose::Slides::PictureFrame,
                   public Aspose::Slides::IAudioFrame

Methods

MethodDescription
System::SharedPtr<IPlaceholder> AddPlaceholder(System::SharedPtr<IPlaceholder>) overrideAdds a new placeholder if there is no and sets placeholder properties to a specified one.
System::ArrayPtr<System::SharedPtr<IShapeElement>> CreateShapeElements() overrideCreates and returns array of shape’s elements.
virtual bool Equals(ptr)Compares objects using C# Object.Equals semantics.
static std::enable_if<IsSmartPtr<T1>::value&&IsSmartPtr<T2>::value, bool>::type Equals(T1 const&, T2 const&)Compares reference type objects in C# style.
static std::enable_if<!IsSmartPtr<T1>::value&&!IsSmartPtr<T2>::value, bool>::type Equals(T1 const&, T2 const&)Compares value type objects in C# style.
static bool Equals(float const&, float const&)Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN.
static bool Equals(double const&, double const&)Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN.
virtual bool FastCast(const Details::FastRttiBase&, void **) constFor internal purposes only.
System::SharedPtr<IAdjustValue> get_Adjustment(int32_t) overrideReturns a shape’s adjustments value at the specified index.
System::SharedPtr<IAdjustValueCollection> get_Adjustments() overrideReturns a collection of shape’s adjustment values. Read-only IAdjustValueCollection.
System::String get_AlternativeText() overrideReturns the alternative text associated with a shape. Read System::String.
System::String get_AlternativeTextTitle() overrideReturns the title of alternative text associated with a shape. Read System::String.
int32_t get_AudioCdEndTrack() overrideReturns a last track index Read int32_t.
int32_t get_AudioCdEndTrackTime() overrideReturns a last track time. Read int32_t.
int32_t get_AudioCdStartTrack() overrideReturns a start track index. Read int32_t.
int32_t get_AudioCdStartTrackTime() overrideReturns a start track time. Read int32_t.
Aspose::Slides::BlackWhiteMode get_BlackWhiteMode() overrideProperty specifies how a shape will render in black-and-white display mode.. Read Slides::BlackWhiteMode.
int32_t get_ConnectionSiteCount() overrideReturns the number of connection sites on the shape. Read-only int32_t.
System::SharedPtr<ICustomData> get_CustomData() overrideReturns the shape’s custom data. Read-only ICustomData.
System::SharedPtr<IEffectFormat> get_EffectFormat() overrideReturns the EffectFormat object which contains pixel effects applied to a shape. Note: can return null for certain types of shapes which don’t have effect properties. Read-only IEffectFormat.
bool get_Embedded() overrideDetermines whether a sound is embedded to a presentation. Read-only bool.
System::SharedPtr<IAudio> get_EmbeddedAudio() overrideReturns embedded audio object. Read IAudio.
System::SharedPtr<IFillFormat> get_FillFormat() overrideReturns the FillFormat object that contains fill formatting properties for a shape. Note: can return null for certain types of shapes which don’t have fill properties. Read-only IFillFormat.
System::SharedPtr<IShapeFrame> get_Frame() overrideReturns the shape frame’s properties. Read IShapeFrame.
float get_Height() overrideReturns the height of the shape. Read float.
bool get_Hidden() overrideDetermines whether the shape is hidden. Read bool.
bool get_HideAtShowing() overrideDetermines whether an AudioFrame is hidden. Read bool.
System::SharedPtr<IHyperlink> get_HyperlinkClick() overrideReturns the hyperlink defined for mouse click. Read IHyperlink.
System::SharedPtr<IHyperlinkManager> get_HyperlinkManager() overrideReturns the hyperlink manager. Read-only IHyperlinkManager.
System::SharedPtr<IHyperlink> get_HyperlinkMouseOver() overrideReturns the hyperlink defined for mouse over. Read IHyperlink.
bool get_IsDecorative() overrideGets ‘Mark as decorative’ option Reed/write bool.
bool get_IsGrouped() overrideDetermines whether the shape is grouped. Read-only bool.
bool get_IsTextHolder() overrideDetermines whether the shape is TextHolder_PPT. Read-only bool.
System::SharedPtr<ILineFormat> get_LineFormat() overrideReturns the LineFormat object that contains line formatting properties for a shape. Note: can return null for certain types of shapes which don’t have line properties. Read-only ILineFormat.
System::String get_LinkPathLong() overrideReturns the name of an audio file which is linked to an AudioFrame. Read System::String.
System::String get_Name() overrideReturns the name of a shape. Must be not null. Use empty string value if needed. Read System::String.
uint32_t get_OfficeInteropShapeId() overrideGets unique shape identifier in slide scope. Read-only uint32_t. See also Shape::get_UniqueId for getting unique shape identifier in presentation scope.
System::SharedPtr<IGroupShape> get_ParentGroup() overrideReturns parent GroupShape object if shape is grouped. Otherwise returns null. Read-only IGroupShape.
System::SharedPtr<IPictureFillFormat> get_PictureFormat() overrideReturns the PictureFillFormat object for a picture frame. Read-only IPictureFillFormat.
System::SharedPtr<IPictureFrameLock> get_PictureFrameLock() overrideReturns shape’s locks. Read-only IPictureFrameLock.
System::SharedPtr<IPlaceholder> get_Placeholder() overrideReturns the placeholder for a shape. Returns null if the shape has no placeholder. Read-only IPlaceholder.
bool get_PlayAcrossSlides() overrideDetermines whether audio is playing across the slides. Read bool.
bool get_PlayLoopMode() overrideDetermines whether an audio is looped. Read bool.
AudioPlayModePreset get_PlayMode() overrideReturns the audio play mode. Read AudioPlayModePreset.
System::SharedPtr<IPresentation> get_Presentation() overrideReturns the parent presentation of a slide. Read-only IPresentation.
System::SharedPtr<IShapeFrame> get_RawFrame() overrideReturns the raw shape frame’s properties. Read IShapeFrame.
float get_RelativeScaleHeight() overrideReturns the scale of height(relative to original picture size) of the picture frame. Value 1.0 corresponds to 100%. Read float.
float get_RelativeScaleWidth() overrideReturns the scale of width (relative to original picture size) of the picture frame. Value 1.0 corresponds to 100%. Read float.
bool get_RewindAudio() overrideDetermines whether audio is automatically rewinded to start after playing. Read bool.
float get_Rotation() overrideReturns the number of degrees the specified shape is rotated around the z-axis. A positive value indicates clockwise rotation; a negative value indicates counterclockwise rotation. Read float.
System::SharedPtr<IBaseShapeLock> get_ShapeLock() overrideReturns shape’s locks. Read-only IBaseShapeLock.
System::SharedPtr<IShapeStyle> get_ShapeStyle() overrideReturns shape’s style object. Read-only IShapeStyle.
Aspose::Slides::ShapeType get_ShapeType() override
System::SharedPtr<IBaseSlide> get_Slide() overrideReturns the parent slide of a shape. Read-only IBaseSlide.
System::SharedPtr<IThreeDFormat> get_ThreeDFormat() overrideReturns the ThreeDFormat object that 3d effect properties for a shape. Note: can return null for certain types of shapes which don’t have 3d properties. Read-only IThreeDFormat.
uint32_t get_UniqueId() overrideGets unique shape identifier in presentation scope. Read-only uint32_t. See also Shape::get_OfficeInteropShapeId for getting unique shape identifier in slide scope.
AudioVolumeMode get_Volume() overrideReturns the audio volume. Read AudioVolumeMode.
float get_Width() overrideReturns the width of the shape. Read float.
float get_X() overrideReturns the x-coordinate of the upper-left corner of the shape. Read float.
float get_Y() overrideReturns the y-coordinate of the upper-left corner of the shape. Read float.
int32_t get_ZOrderPosition() overrideReturns the position of a shape in the z-order. Shapes[0] returns the shape at the back of the z-order, and Shapes[Shapes.Count - 1] returns the shape at the front of the z-order. Read-only int32_t.
System::SharedPtr<IShape> GetBasePlaceholder() overrideReturns a basic placeholder shape (shape from the layout and/or master slide that the current shape is inherited from).
Detail::SmartPtrCounter * GetCounter()Gets reference counter data structure associated with the object.
System::ArrayPtr<System::SharedPtr<IGeometryPath>> GetGeometryPaths() overrideReturns the copy of path of the geometry shape. Coordinates are relative to the left top corner of the shape.
virtual int32_t GetHashCode() constAnalog of C# Object.GetHashCode() method. Enables hashing of custom objects.
System::SharedPtr<System::Drawing::Bitmap> GetThumbnail() overrideReturns shape thumbnail. ShapeThumbnailBounds::Shape shape thumbnail bounds type is used by default.
System::SharedPtr<System::Drawing::Bitmap> GetThumbnail(ShapeThumbnailBounds, float, float) overrideReturns shape thumbnail.
virtual const TypeInfo& GetType() constGets actual type of object. Analog of C# System.Object.GetType() call.
virtual bool Is(const TypeInfo&) constCheck if object represents an instance of type described by targetType. Analog of C# ‘is’ operator.
void Lock()Implements C# lock() statement locking. Call directly or use LockContext sentry object.
virtual ptr MemberwiseClone() constAnalog of C# Object.MemberwiseClone() method. Enables cloning custom types.
Object()Creates object. Initializes all internal data structures.
Object(Object const&)Copy constructor. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses.
Object& operator=(Object const&)Assignment operator. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses.
static bool ReferenceEquals(ptr const&, ptr const&)Compares objects by reference.
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, T const&)Compares objects by reference.
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, std::nullptr_t)Reference-compares value type object with nullptr.
bool ReferenceEquals(String const&, std::nullptr_t)Specialization of Object::ReferenceEquals for case of string and nullptr.
bool ReferenceEquals(String const&, String const&)Specialization of Object::ReferenceEquals for case of strings.
int RemovedSharedRefs(int)Decreases shared reference count by specified value.
void RemovePlaceholder() overrideDefines that this shape isn’t a placeholder.
void set_AlternativeText(System::String) overrideSets the alternative text associated with a shape. Write System::String.
void set_AlternativeTextTitle(System::String) overrideSets the title of alternative text associated with a shape. Write System::String.
void set_AudioCdEndTrack(int32_t) overrideSets a last track index Write int32_t.
void set_AudioCdEndTrackTime(int32_t) overrideSets a last track time. Write int32_t.
void set_AudioCdStartTrack(int32_t) overrideSets a start track index. Write int32_t.
void set_AudioCdStartTrackTime(int32_t) overrideSets a start track time. Write int32_t.
void set_BlackWhiteMode(Aspose::Slides::BlackWhiteMode) overrideProperty specifies how a shape will render in black-and-white display mode.. Write Slides::BlackWhiteMode.
void set_EmbeddedAudio(System::SharedPtr<IAudio>) overrideSets embedded audio object. Write IAudio.
void set_Frame(System::SharedPtr<IShapeFrame>) overrideSets the shape frame’s properties. Write IShapeFrame.
void set_Height(float) overrideSets the height of the shape. Write float.
void set_Hidden(bool) overrideDetermines whether the shape is hidden. Write bool.
void set_HideAtShowing(bool) overrideDetermines whether an AudioFrame is hidden. Write bool.
void set_HyperlinkClick(System::SharedPtr<IHyperlink>) overrideSets the hyperlink defined for mouse click. Write IHyperlink.
void set_HyperlinkMouseOver(System::SharedPtr<IHyperlink>) overrideSets the hyperlink defined for mouse over. Write IHyperlink.
void set_IsDecorative(bool) overrideSets ‘Mark as decorative’ option Reed/write bool.
void set_LinkPathLong(System::String) overrideSets the name of an audio file which is linked to an AudioFrame. Write System::String.
void set_Name(System::String) overrideSets the name of a shape. Must be not null. Use empty string value if needed. Write System::String.
void set_PlayAcrossSlides(bool) overrideDetermines whether audio is playing across the slides. Write bool.
void set_PlayLoopMode(bool) overrideDetermines whether an audio is looped. Write bool.
void set_PlayMode(AudioPlayModePreset) overrideSets the audio play mode. Write AudioPlayModePreset.
void set_RawFrame(System::SharedPtr<IShapeFrame>) overrideSets the raw shape frame’s properties. Write IShapeFrame.
void set_RelativeScaleHeight(float) overrideSets the scale of height(relative to original picture size) of the picture frame. Value 1.0 corresponds to 100%. Write float.
void set_RelativeScaleWidth(float) overrideSets the scale of width (relative to original picture size) of the picture frame. Value 1.0 corresponds to 100%. Write float.
void set_RewindAudio(bool) overrideDetermines whether audio is automatically rewinded to start after playing. Write bool.
void set_Rotation(float) overrideSets the number of degrees the specified shape is rotated around the z-axis. A positive value indicates clockwise rotation; a negative value indicates counterclockwise rotation. Write float.
void set_ShapeType(Aspose::Slides::ShapeType) override
void set_Volume(AudioVolumeMode) overrideSets the audio volume. Write AudioVolumeMode.
void set_Width(float) overrideSets the width of the shape. Write float.
void set_X(float) overrideSets the x-coordinate of the upper-left corner of the shape. Write float.
void set_Y(float) overrideSets the y-coordinate of the upper-left corner of the shape. Write float.
void SetGeometryPath(System::SharedPtr<IGeometryPath>) overrideUpdates shape geometry from IGeometryPath object. Coordinates must be relative to the left top corner of the shape. Changes the type of the shape (ShapeType) to ShapeType::Custom.
void SetGeometryPaths(System::ArrayPtr<System::SharedPtr<IGeometryPath>>) overrideUpdates shape geometry from array of IGeometryPath. Coordinates must be relative to the left top corner of the shape. Changes the type of the shape (ShapeType) to ShapeType::Custom.
virtual void SetTemplateWeakPtr(uint32_t)Set n’th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode.
int SharedCount() constGets current value of shared reference counter.
Object * SharedRefAdded()Increments shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
int SharedRefRemovedSafe()Decrements and returns shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
virtual String ToString() constAnalog of C# Object.ToString() method. Enables converting custom objects to string.
static const TypeInfo& Type()Implements C# typeof(System.Object) construct.
void Unlock()Implements C# lock() statement unlocking. Call directly or use LockContext sentry object.
Detail::SmartPtrCounter * WeakRefAdded()Increments weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
void WeakRefRemoved()Decrements weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
void WriteAsSvg(System::SharedPtr<System::IO::Stream>) overrideSaves content of Shape as SVG file.
void WriteAsSvg(System::SharedPtr<System::IO::Stream>, System::SharedPtr<Export::ISVGOptions>) overrideSaves content of Shape as SVG file.
virtual ~Object()Destroys object. Frees all internal data structures.

Remarks

The following examples shows how to change Audio Play Options.

auto pres = System::MakeObject<Presentation>(u"AudioFrameEmbed_out.pptx");

// Gets the AudioFrame shape
System::SharedPtr<AudioFrame> audioFrame = System::ExplicitCast<AudioFrame>(pres->get_Slides()->idx_get(0)->get_Shapes()->idx_get(0));
// Sets the Play mode to play on click
audioFrame->set_PlayMode(AudioPlayModePreset::OnClick);
// Sets the volume to Low
audioFrame->set_Volume(AudioVolumeMode::Low);
// Sets the audio to play across slides
audioFrame->set_PlayAcrossSlides(true);
// Disables loop for the audio
audioFrame->set_PlayLoopMode(false);
// Hides the AudioFrame during the slide show
audioFrame->set_HideAtShowing(true);
// Rewinds the audio to start after playing
audioFrame->set_RewindAudio(true);
// Saves the PowerPoint file to disk
pres->Save(u"AudioFrameEmbed_changed.pptx", SaveFormat::Pptx);

See Also