DsPdfJS API - v9.1.0
    Preparing search index...

    Class SoundObject

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

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get bitsPerSample(): number

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

      Returns number

    • set bitsPerSample(value: number): void

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

      Parameters

      • value: number

      Returns void

    • get encodingFormat(): string

      Gets or sets the encoding format for the sample data, one of: "Raw", "Signed", "muLaw" or "ALaw".

      Returns string

    • set encodingFormat(value: string): void

      Gets or sets the encoding format for the sample data, one of: "Raw", "Signed", "muLaw" or "ALaw".

      Parameters

      • value: string

      Returns void

    • get id(): number

      Gets the reference to the object.

      Returns number

    • get samplingRate(): number

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

      Returns number

    • set samplingRate(value: number): void

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

      Parameters

      • value: number

      Returns void

    • get soundChannels(): number

      Gets or sets the number of sound channels.

      Returns number

    • set soundChannels(value: number): void

      Gets or sets the number of sound channels.

      Parameters

      • value: number

      Returns void

    Methods

    • Detaches the object from the ObjectManager and deallocates its memory, if possible.

      Returns void

    • Gets a Uint8Array object containing the audio data.

      Returns Uint8Array<ArrayBufferLike> | null

    • Sets the audio data.

      Parameters

      • data: Uint8Array<ArrayBufferLike> | null

      Returns void