[]
DsPdfJS API / SoundObject
Represents a sound object, which is a stream containing sample values that define a sound to be played through the computer's speakers.
new SoundObject(
om):SoundObject
Creates empty instance of a SoundObject object.
ObjectManager that controls the lifetime of the SoundObject.
SoundObject
ObjectBase.constructor
new SoundObject():
SoundObject
Creates empty instance of a SoundObject object.
SoundObject
ObjectBase.constructor
new SoundObject(
om,properties):SoundObject
Creates a SoundObject object on the base of properties specified by the SoundObjectProperties.
ObjectManager that controls the lifetime of the SoundObject.
The properties of created object.
SoundObject
ObjectBase.constructor
new SoundObject(
properties):SoundObject
Creates a SoundObject object on the base of properties specified by the SoundObjectProperties.
The properties of created object.
SoundObject
ObjectBase.constructor
new SoundObject(
om,audioData,format?):SoundObject
Creates a SoundObject from audio data of WAF or AIFF format.
ObjectManager that controls the lifetime of the SoundObject.
Uint8Array
The audio data.
The audio data format, not specified means 'Auto'.
SoundObject
ObjectBase.constructor
new SoundObject(
audioData,format?):SoundObject
Creates a SoundObject from audio data of WAF or AIFF format.
Uint8Array
The audio data.
The audio data format, not specified means 'Auto'.
SoundObject
ObjectBase.constructor
get bitsPerSample():
number
Gets or sets the number of bits per sample value per channel.
number
set bitsPerSample(
value):void
Gets or sets the number of bits per sample value per channel.
number
void
get encodingFormat():
string
Gets or sets the encoding format for the sample data, one of: "Raw", "Signed", "muLaw" or "ALaw".
string
set encodingFormat(
value):void
Gets or sets the encoding format for the sample data, one of: "Raw", "Signed", "muLaw" or "ALaw".
string
void
get id():
number
Gets the reference to the object.
number
get om():
ObjectManager
Gets the owner ObjectManager instance.
get samplingRate():
number
Gets or sets the sampling rate, in samples per second.
number
set samplingRate(
value):void
Gets or sets the sampling rate, in samples per second.
number
void
get soundChannels():
number
Gets or sets the number of sound channels.
number
set soundChannels(
value):void
Gets or sets the number of sound channels.
number
void
free():
void
Detaches the object from the ObjectManager and deallocates its memory, if possible.
void
getAudioData():
Uint8Array<ArrayBufferLike> |null
Gets a Uint8Array object containing the audio data.
Uint8Array<ArrayBufferLike> | null
rebind(
omTo):void
Rebinds the object from the current ObjectManager to the specified one.
The new ObjectManager for the object.
void
setAudioData(
data):void
Sets the audio data.
Uint8Array<ArrayBufferLike> | null
void