Class AudioClock
A clock used to raise audio data in appropriate intervals.
Inheritance
System.Object
AudioClock
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class AudioClock : object
Constructors
AudioClock(Int32, Int32, Action2<Int32, Int32>)
Creates a new AudioClock.
Declaration
public AudioClock(int clockRate, int channelCount, Action2<int, int> raiseCallback)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | clockRate | The clock rate to use. |
System.Int32 | channelCount | How many channels the audio will have. |
Action2<System.Int32, System.Int32> | raiseCallback | The callback that will be invoked when data is needed. |
AudioClock(Int32, Int32, Int32, Action2<Int32, Int32>)
Creates a new AudioClock.
Declaration
public AudioClock(int clockRate, int channelCount, int blockAlign, Action2<int, int> raiseCallback)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | clockRate | The clock rate to use. |
System.Int32 | channelCount | How many channels the audio will have. |
System.Int32 | blockAlign | The block align of the source data. |
Action2<System.Int32, System.Int32> | raiseCallback | The callback that will be invoked when data is needed. |
Properties
BlockAlign
Gets the BlockAlign.
Declaration
public int BlockAlign { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
ChannelCount
Gets the audio's channel count.
Declaration
public int ChannelCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
ClockRate
Gets the audio's clock rate.
Declaration
public int ClockRate { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Running
Gets whether the clock is running.
Declaration
public bool Running { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
StrictDuration
Gets or sets the strict duration, in milliseconds. If 0, then variable duration is used. If greater than zero, then the clock will only raise frames of that duration.
Declaration
public int StrictDuration { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
Start()
Starts the audio clock.
Declaration
public void Start()
Stop()
Stops the audio clock.
Declaration
public void Stop()