FMLiveSwitchAudioClock Class Reference

A clock used to raise audio data in appropriate intervals. More...

Instance Methods

(int) - blockAlign
 Gets the BlockAlign. More...
 
(int) - channelCount
 Gets the audio's channel count. More...
 
(int) - clockRate
 Gets the audio's clock rate. More...
 
(instancetype) - initWithClockRate:channelCount:blockAlign:raiseCallback:
 Creates a new AudioClock. More...
 
(instancetype) - initWithClockRate:channelCount:blockAlign:raiseCallbackBlock:
 Creates a new AudioClock. More...
 
(instancetype) - initWithClockRate:channelCount:raiseCallback:
 Creates a new AudioClock. More...
 
(instancetype) - initWithClockRate:channelCount:raiseCallbackBlock:
 Creates a new AudioClock. More...
 
(bool) - running
 Gets whether the clock is running. More...
 
(void) - setStrictDuration:
 Sets the strict duration, in milliseconds. More...
 
(void) - start
 Starts the audio clock. More...
 
(void) - stop
 Stops the audio clock. More...
 
(int) - strictDuration
 Gets the strict duration, in milliseconds. More...
 

Class Methods

(FMLiveSwitchAudioClock *) + audioClockWithClockRate:channelCount:blockAlign:raiseCallback:
 Creates a new AudioClock. More...
 
(FMLiveSwitchAudioClock *) + audioClockWithClockRate:channelCount:blockAlign:raiseCallbackBlock:
 Creates a new AudioClock. More...
 
(FMLiveSwitchAudioClock *) + audioClockWithClockRate:channelCount:raiseCallback:
 Creates a new AudioClock. More...
 
(FMLiveSwitchAudioClock *) + audioClockWithClockRate:channelCount:raiseCallbackBlock:
 Creates a new AudioClock. More...
 

Detailed Description

A clock used to raise audio data in appropriate intervals.

Method Documentation

◆ audioClockWithClockRate:channelCount:blockAlign:raiseCallback:

+ (FMLiveSwitchAudioClock*) audioClockWithClockRate: (int)  clockRate
channelCount: (int)  channelCount
blockAlign: (int)  blockAlign
raiseCallback: (FMLiveSwitchAction2< id, id > *)  raiseCallback 

Creates a new AudioClock.

Parameters
clockRateThe clock rate to use.
channelCountHow many channels the audio will have.
blockAlignThe block align of the source data.
raiseCallbackThe callback that will be invoked when data is needed.

◆ audioClockWithClockRate:channelCount:blockAlign:raiseCallbackBlock:

+ (FMLiveSwitchAudioClock*) audioClockWithClockRate: (int)  clockRate
channelCount: (int)  channelCount
blockAlign: (int)  blockAlign
raiseCallbackBlock: (void(^)(int, int))  raiseCallbackBlock 

Creates a new AudioClock.

Parameters
clockRateThe clock rate to use.
channelCountHow many channels the audio will have.
blockAlignThe block align of the source data.
raiseCallbackBlockThe callback that will be invoked when data is needed.

◆ audioClockWithClockRate:channelCount:raiseCallback:

+ (FMLiveSwitchAudioClock*) audioClockWithClockRate: (int)  clockRate
channelCount: (int)  channelCount
raiseCallback: (FMLiveSwitchAction2< id, id > *)  raiseCallback 

Creates a new AudioClock.

Parameters
clockRateThe clock rate to use.
channelCountHow many channels the audio will have.
raiseCallbackThe callback that will be invoked when data is needed.

◆ audioClockWithClockRate:channelCount:raiseCallbackBlock:

+ (FMLiveSwitchAudioClock*) audioClockWithClockRate: (int)  clockRate
channelCount: (int)  channelCount
raiseCallbackBlock: (void(^)(int, int))  raiseCallbackBlock 

Creates a new AudioClock.

Parameters
clockRateThe clock rate to use.
channelCountHow many channels the audio will have.
raiseCallbackBlockThe callback that will be invoked when data is needed.

◆ blockAlign

- (int) blockAlign

Gets the BlockAlign.

◆ channelCount

- (int) channelCount

Gets the audio's channel count.

◆ clockRate

- (int) clockRate

Gets the audio's clock rate.

◆ initWithClockRate:channelCount:blockAlign:raiseCallback:

- (instancetype) initWithClockRate: (int)  clockRate
channelCount: (int)  channelCount
blockAlign: (int)  blockAlign
raiseCallback: (FMLiveSwitchAction2< id, id > *)  raiseCallback 

Creates a new AudioClock.

Parameters
clockRateThe clock rate to use.
channelCountHow many channels the audio will have.
blockAlignThe block align of the source data.
raiseCallbackThe callback that will be invoked when data is needed.

◆ initWithClockRate:channelCount:blockAlign:raiseCallbackBlock:

- (instancetype) initWithClockRate: (int)  clockRate
channelCount: (int)  channelCount
blockAlign: (int)  blockAlign
raiseCallbackBlock: (void(^)(int, int))  raiseCallbackBlock 

Creates a new AudioClock.

Parameters
clockRateThe clock rate to use.
channelCountHow many channels the audio will have.
blockAlignThe block align of the source data.
raiseCallbackBlockThe callback that will be invoked when data is needed.

◆ initWithClockRate:channelCount:raiseCallback:

- (instancetype) initWithClockRate: (int)  clockRate
channelCount: (int)  channelCount
raiseCallback: (FMLiveSwitchAction2< id, id > *)  raiseCallback 

Creates a new AudioClock.

Parameters
clockRateThe clock rate to use.
channelCountHow many channels the audio will have.
raiseCallbackThe callback that will be invoked when data is needed.

◆ initWithClockRate:channelCount:raiseCallbackBlock:

- (instancetype) initWithClockRate: (int)  clockRate
channelCount: (int)  channelCount
raiseCallbackBlock: (void(^)(int, int))  raiseCallbackBlock 

Creates a new AudioClock.

Parameters
clockRateThe clock rate to use.
channelCountHow many channels the audio will have.
raiseCallbackBlockThe callback that will be invoked when data is needed.

◆ running

- (bool) running

Gets whether the clock is running.

◆ setStrictDuration:

- (void) setStrictDuration: (int)  value

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.

◆ start

- (void) start

Starts the audio clock.

◆ stop

- (void) stop

Stops the audio clock.

◆ strictDuration

- (int) strictDuration

Gets 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.