[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.SoundObject

SoundObject Class

Represents a sound object, which is a stream containing sample values that define a sound to be played through the computer's speakers.

Implements
Namespace: GrapeCity.Documents.Pdf
Assembly: DS.Documents.Pdf.dll
Syntax
public class SoundObject : PdfDictWrapper, IPdfDict
Public Class SoundObject
    Inherits PdfDictWrapper
    Implements IPdfDict

Constructors

Name Description
SoundObject()

Initializes a new instance of the SoundObject class.

Properties

Name Description
BitsPerSample

Gets or sets the number of bits per sample value per channel.

EncodingFormat

Gets or sets the encoding format for the sample data, see SoundEncodingFormat.

SamplingRate

Gets or sets the sampling rate, in samples per second.

SoundChannels

Gets or sets the number of sound channels.

Methods

Name Description
FromFile(string, AudioFormat)

Creates a SoundObject from a specified file.

Note that only a limited set of audio formats is supported, see AudioFormat for details.

FromStream(Stream, AudioFormat)

Creates a SoundObject from a specified stream.

Note that only a limited set of audio formats is supported, see AudioFormat for details.

GetAudioDataStream()

Gets a Stream object containing the audio data.

IMPORTANT: that the stream should be disposed after usage.

SetAudioDataStream(Stream)

Sets the audio data stream.

IMPORTANT: the stream will be read when the document is saved, so it should be available at that time.

Extension Methods