FMLiveSwitchSoundReframerContext Class Reference

A sound reframer context that can reframe sound chunks into consistent durations. More...

Instance Methods

(void) - addOnFrame:
 Adds a handler that is raised when a frame is ready. More...
 
(FMLiveSwitchAudioFrame *) - addOnFrameWithBlock
 Adds a handler that is raised when a frame is ready. More...
 
(void) - addOnFrameWithBlock:
 Adds a handler that is raised when a frame is ready. More...
 
(long long) - autoTimestampWithTimestampDelta:
 Gets the next timestamp. More...
 
(FMLiveSwitchAudioConfig *) - config
 Gets the config. More...
 
(bool) - disableTimestampReset
 Gets whether timestamp resetting should be disabled entirely. More...
 
(bool) - forceTimestampReset
 Gets whether to force a timestamp reset with the next raised frame. More...
 
(int) - frameDuration
 Gets the frame duration. More...
 
(instancetype) - initWithFrameDuration:config:
 Initializes a new instance of the FMLiveSwitchSoundReframerContext class. More...
 
(void) - processFrame:inputBuffer:
 Processes a frame. More...
 
(void) - removeOnFrame:
 Removes a handler that is raised when a frame is ready. More...
 
(void) - setDisableTimestampReset:
 Sets whether timestamp resetting should be disabled entirely. More...
 
(void) - setForceTimestampReset:
 Sets whether to force a timestamp reset with the next raised frame. More...
 
(void) - setTimestampResetInterval:
 Sets the amount of time in milliseconds between audio frames that will trigger a wall-clock reset of the timestamp. More...
 
(int) - timestampResetInterval
 Gets the amount of time in milliseconds between audio frames that will trigger a wall-clock reset of the timestamp. More...
 

Class Methods

(FMLiveSwitchSoundReframerContext *) + soundReframerContextWithFrameDuration:config:
 Initializes a new instance of the FMLiveSwitchSoundReframerContext class. More...
 

Detailed Description

A sound reframer context that can reframe sound chunks into consistent durations.

Method Documentation

◆ addOnFrame:

- (void) addOnFrame: (FMLiveSwitchAction1< FMLiveSwitchAudioFrame * > *)  value

Adds a handler that is raised when a frame is ready.

◆ addOnFrameWithBlock

- (FMLiveSwitchAudioFrame*) addOnFrameWithBlock

Adds a handler that is raised when a frame is ready.

◆ addOnFrameWithBlock:

- (void) addOnFrameWithBlock: (void(^)(FMLiveSwitchAudioFrame *))  valueBlock

Adds a handler that is raised when a frame is ready.

◆ autoTimestampWithTimestampDelta:

- (long long) autoTimestampWithTimestampDelta: (int)  timestampDelta

Gets the next timestamp.

◆ config

Gets the config.

◆ disableTimestampReset

- (bool) disableTimestampReset

Gets whether timestamp resetting should be disabled entirely.

Only applies if timestamps are auto-generated (i.e. not set on the frames).

◆ forceTimestampReset

- (bool) forceTimestampReset

Gets whether to force a timestamp reset with the next raised frame.

If set to true, this value will be reset to false after the wall-clock reset takes place. Only applies if timestamps are auto-generated (i.e. not set on the frames).

◆ frameDuration

- (int) frameDuration

Gets the frame duration.

◆ initWithFrameDuration:config:

- (instancetype) initWithFrameDuration: (int)  frameDuration
config: (FMLiveSwitchAudioConfig *)  config 

Initializes a new instance of the FMLiveSwitchSoundReframerContext class.

Parameters
frameDurationThe frame duration.
configThe configuration.

◆ processFrame:inputBuffer:

- (void) processFrame: (FMLiveSwitchAudioFrame *)  frame
inputBuffer: (FMLiveSwitchAudioBuffer *)  inputBuffer 

Processes a frame.

Parameters
frameThe frame.
inputBufferThe input buffer.

◆ removeOnFrame:

- (void) removeOnFrame: (FMLiveSwitchAction1< FMLiveSwitchAudioFrame * > *)  value

Removes a handler that is raised when a frame is ready.

◆ setDisableTimestampReset:

- (void) setDisableTimestampReset: (bool)  value

Sets whether timestamp resetting should be disabled entirely.

Only applies if timestamps are auto-generated (i.e. not set on the frames).

◆ setForceTimestampReset:

- (void) setForceTimestampReset: (bool)  value

Sets whether to force a timestamp reset with the next raised frame.

If set to true, this value will be reset to false after the wall-clock reset takes place. Only applies if timestamps are auto-generated (i.e. not set on the frames).

◆ setTimestampResetInterval:

- (void) setTimestampResetInterval: (int)  value

Sets the amount of time in milliseconds between audio frames that will trigger a wall-clock reset of the timestamp.

Only applies if timestamps are auto-generated (i.e. not set on the frames). Defaults to 1000.

◆ soundReframerContextWithFrameDuration:config:

+ (FMLiveSwitchSoundReframerContext*) soundReframerContextWithFrameDuration: (int)  frameDuration
config: (FMLiveSwitchAudioConfig *)  config 

Initializes a new instance of the FMLiveSwitchSoundReframerContext class.

Parameters
frameDurationThe frame duration.
configThe configuration.

◆ timestampResetInterval

- (int) timestampResetInterval

Gets the amount of time in milliseconds between audio frames that will trigger a wall-clock reset of the timestamp.

Only applies if timestamps are auto-generated (i.e. not set on the frames). Defaults to 1000.