A AudioBuffer containing an RtpHeader. More...
Public Member Functions | |
PacketizedAudioBuffer (fm.liveswitch.DataBuffer dataBuffer, fm.liveswitch.AudioFormat format, fm.liveswitch.RtpPacketHeader rtpHeader) | |
Initializes a new instance of the fm.liveswitch.AudioBuffer class. More... | |
PacketizedAudioBuffer (fm.liveswitch.DataBuffer[] dataBuffers, fm.liveswitch.AudioFormat format, fm.liveswitch.RtpPacketHeader[] rtpHeaders) | |
Initializes a new instance of the fm.liveswitch.AudioBuffer class. More... | |
Public Member Functions inherited from fm.liveswitch.AudioBuffer | |
void | applyGain (double gain) |
Applies gain to this instance. More... | |
AudioBuffer (fm.liveswitch.DataBuffer dataBuffer, fm.liveswitch.AudioFormat format) | |
Initializes a new instance of the fm.liveswitch.AudioBuffer class. More... | |
AudioBuffer (fm.liveswitch.DataBuffer[] dataBuffers, fm.liveswitch.AudioFormat format) | |
Initializes a new instance of the fm.liveswitch.AudioBuffer class. More... | |
double | calculateLevel () |
Calculates the level of this instance. More... | |
fm.liveswitch.AudioBuffer | clone () |
Clones this instance. More... | |
double | getGain () |
Gets the gain. More... | |
boolean | getGeneratedByPlc () |
Gets a value indicating whether this buffer contains data generated by packet loss concealment (PLC). More... | |
boolean | getIsDtmf () |
Gets a value indicating whether this buffer has DTMF data. More... | |
boolean | getIsL16 () |
Gets a value indicating whether this buffer has L16 audio. More... | |
boolean | getIsMuted () |
Gets a value indicating whether this instance has been muted. More... | |
boolean | getIsOpus () |
Gets a value indicating whether this buffer has Opus audio. More... | |
boolean | getIsPcm () |
Gets a value indicating whether this buffer has raw PCM audio. More... | |
boolean | getIsPcma () |
Gets a value indicating whether this buffer has PCMA audio. More... | |
boolean | getIsPcmu () |
Gets a value indicating whether this buffer has PCMU audio. More... | |
boolean | mute () |
Mutes this instance. More... | |
void | setGeneratedByPlc (boolean value) |
Sets a value indicating whether this buffer contains data generated by packet loss concealment (PLC). More... | |
String | toJson () |
Serializes this instance to JSON. More... | |
Public Member Functions inherited from fm.liveswitch.Dynamic | |
java.util.HashMap< String, Object > | getDynamicProperties () |
Gets all dynamic properties on this instance. More... | |
Object | getDynamicValue (String key) |
Gets a property value from the local cache. More... | |
void | setDynamicValue (String key, Object value) |
Sets a property value in the local cache. More... | |
boolean | unsetDynamicValue (String key) |
Removes a property value from the local cache. More... | |
Protected Member Functions | |
fm.liveswitch.AudioBuffer | createInstance () |
Creates a new instance. More... | |
Protected Member Functions inherited from fm.liveswitch.AudioBuffer | |
AudioBuffer () | |
Initializes a new instance of the fm.liveswitch.AudioBuffer class. More... | |
Protected Member Functions inherited from fm.liveswitch.Dynamic | |
Dynamic () | |
Protected Member Functions inherited from fm.liveswitch.Serializable | |
boolean | getIsDirty () |
Gets a value indicating whether this instance is dirty. More... | |
Serializable () | |
Initializes a new instance of the fm.liveswitch.Serializable class. More... | |
void | setIsDirty (boolean value) |
Sets a value indicating whether this instance is dirty. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from fm.liveswitch.AudioBuffer | |
static fm.liveswitch.AudioBuffer | createSilence (int duration, int clockRate, int channelCount) |
Creates a silent audio buffer with the specified duration, clock rate, and channel count. More... | |
static fm.liveswitch.AudioBuffer | createSilence (int duration, fm.liveswitch.AudioConfig config) |
Creates a silent audio buffer with the specified duration and configuration. More... | |
static fm.liveswitch.AudioBuffer | createSound (long timestamp, int duration, int clockRate, int channelCount) |
Creates an audio buffer with the specified duration, clock rate, and channel count, a frequency of 440Hz, and an amplitude of 16,384. More... | |
static fm.liveswitch.AudioBuffer | createSound (long timestamp, int duration, int clockRate, int channelCount, float frequency) |
Creates a silent audio buffer with the specified duration, clock rate, channel count, and frequency, and an amplitude of 16,384. More... | |
static fm.liveswitch.AudioBuffer | createSound (long timestamp, int duration, int clockRate, int channelCount, float frequency, int amplitude) |
Creates a silent audio buffer with the specified duration, clock rate, channel count, frequency, and amplitude. More... | |
static fm.liveswitch.AudioBuffer | createSound (long timestamp, int duration, fm.liveswitch.AudioConfig config) |
Creates an audio buffer with the specified duration and configuration, a frequency of 440Hz, and an amplitude of 16,384. More... | |
static fm.liveswitch.AudioBuffer | createSound (long timestamp, int duration, fm.liveswitch.AudioConfig config, float frequency) |
Creates a silent audio buffer with the specified duration, configuration, and frequency, and an amplitude of 16,384. More... | |
static fm.liveswitch.AudioBuffer | createSound (long timestamp, int duration, fm.liveswitch.AudioConfig config, float frequency, int amplitude) |
Creates a silent audio buffer with the specified duration, configuration, frequency, and amplitude. More... | |
static fm.liveswitch.AudioBuffer | fromJson (String audioBufferJson) |
Deserializes an instance from JSON. More... | |
static fm.liveswitch.AudioBuffer[] | fromJsonArray (String audioBuffersJson) |
Deserializes an array of instances from JSON. More... | |
static int | getMinimumBufferLength (int duration, int clockRate, int channelCount) |
Gets the minimum data buffer length for a given duration, clock rate, and channel count. More... | |
static int | getMinimumBufferLength (int duration, fm.liveswitch.AudioConfig config) |
Gets the minimum data buffer length for a given duration and configuration. More... | |
static String | toJson (final fm.liveswitch.AudioBuffer audioBuffer) |
Serializes an instance to JSON. More... | |
static String | toJsonArray (fm.liveswitch.AudioBuffer[] audioBuffers) |
Serializes an array of instances to JSON. More... | |
A AudioBuffer containing an RtpHeader.
fm.liveswitch.PacketizedAudioBuffer.PacketizedAudioBuffer | ( | fm.liveswitch.DataBuffer | dataBuffer, |
fm.liveswitch.AudioFormat | format, | ||
fm.liveswitch.RtpPacketHeader | rtpHeader | ||
) |
Initializes a new instance of the fm.liveswitch.AudioBuffer class.
dataBuffer | The data buffer. |
format | The format. |
rtpHeader | The RTP header. |
fm.liveswitch.PacketizedAudioBuffer.PacketizedAudioBuffer | ( | fm.liveswitch.DataBuffer[] | dataBuffers, |
fm.liveswitch.AudioFormat | format, | ||
fm.liveswitch.RtpPacketHeader[] | rtpHeaders | ||
) |
Initializes a new instance of the fm.liveswitch.AudioBuffer class.
dataBuffers | The data buffers. |
format | The format. |
rtpHeaders | The RTP headers. |
|
protected |
Creates a new instance.
Reimplemented from fm.liveswitch.AudioBuffer.