Class AudioFrame
An audio frame.
Inheritance
System.Object
AudioFrame
Inherited Members
MediaFrame<AudioBuffer, AudioBufferCollection, AudioFormat, AudioFrame>.RemoveBuffers(AudioBuffer[])
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class AudioFrame : MediaFrame<AudioBuffer, AudioBufferCollection, AudioFormat, AudioFrame>
Constructors
AudioFrame(Int32)
Initializes a new instance of the AudioFrame class.
Declaration
public AudioFrame(int duration)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | duration | The duration. |
AudioFrame(Int32, AudioBuffer)
Initializes a new instance of the AudioFrame class.
Declaration
public AudioFrame(int duration, AudioBuffer buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | duration | The duration. |
AudioBuffer | buffer | The buffer. |
AudioFrame(Int32, AudioBuffer[])
Initializes a new instance of the AudioFrame class.
Declaration
public AudioFrame(int duration, AudioBuffer[] buffers)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | duration | The duration. |
AudioBuffer[] | buffers | The buffers. |
Properties
Duration
Gets or sets the duration.
Declaration
public int Duration { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
CalculateTimestampDelta(Int32, Int32)
Calculates a timestamp delta given a duration and clock rate.
Declaration
public static int CalculateTimestampDelta(int duration, int clockRate)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | duration | The duration in milliseconds. |
System.Int32 | clockRate | The clock rate. |
Returns
Type | Description |
---|---|
System.Int32 |
Clone()
Clones this instance.
Declaration
public override AudioFrame Clone()
Returns
Type | Description |
---|---|
AudioFrame |
Overrides
FM.LiveSwitch.MediaFrame<FM.LiveSwitch.AudioBuffer, FM.LiveSwitch.AudioBufferCollection, FM.LiveSwitch.AudioFormat, FM.LiveSwitch.AudioFrame>.Clone()
CreateInstance()
Creates a new instance.
Declaration
public override AudioFrame CreateInstance()
Returns
Type | Description |
---|---|
AudioFrame |
Overrides
FM.LiveSwitch.MediaFrame<FM.LiveSwitch.AudioBuffer, FM.LiveSwitch.AudioBufferCollection, FM.LiveSwitch.AudioFormat, FM.LiveSwitch.AudioFrame>.CreateInstance()
CreateMediaBufferCollection()
Creates a media buffer collection.
Declaration
protected override AudioBufferCollection CreateMediaBufferCollection()
Returns
Type | Description |
---|---|
AudioBufferCollection |
Overrides
FM.LiveSwitch.MediaFrame<FM.LiveSwitch.AudioBuffer, FM.LiveSwitch.AudioBufferCollection, FM.LiveSwitch.AudioFormat, FM.LiveSwitch.AudioFrame>.CreateMediaBufferCollection()
GeneratePcmFrame(Int32, AudioConfig)
Generates a silent audio frame for the given duration and configuration.
Declaration
public static AudioFrame GeneratePcmFrame(int duration, AudioConfig config)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | duration | The duration. |
AudioConfig | config | The configuration. |
Returns
Type | Description |
---|---|
AudioFrame |
ToString()
Returns a string that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Object.ToString()