FMLiveSwitchCircularBuffer Class Reference

A circular buffer. More...

Instance Methods

(int) - available
 Gets the number of bytes available for reading. More...
 
(instancetype) - initWithLength:latency:
 Initializes a new instance of the FMLiveSwitchCircularBuffer class. More...
 
(instancetype) - initWithLength:latency:littleEndian:
 Initializes a new instance of the FMLiveSwitchCircularBuffer class. More...
 
(int) - latency
 Gets the latency. More...
 
(int) - length
 Gets the length. More...
 
(bool) - littleEndian
 Gets whether the data is little-endian. More...
 
(int) - readOffset
 Gets the read offset. More...
 
(FMLiveSwitchDataBuffer *) - readWithLength:
 Reads data from the buffer. More...
 
(int) - writeOffset
 Gets the read offset. More...
 
(void) - writeWithBuffer:
 Writes data to the buffer. More...
 

Class Methods

(FMLiveSwitchCircularBuffer *) + circularBufferWithLength:latency:
 Initializes a new instance of the FMLiveSwitchCircularBuffer class. More...
 
(FMLiveSwitchCircularBuffer *) + circularBufferWithLength:latency:littleEndian:
 Initializes a new instance of the FMLiveSwitchCircularBuffer class. More...
 

Detailed Description

A circular buffer.

Method Documentation

◆ available

- (int) available

Gets the number of bytes available for reading.

◆ circularBufferWithLength:latency:

+ (FMLiveSwitchCircularBuffer*) circularBufferWithLength: (int)  length
latency: (int)  latency 

Initializes a new instance of the FMLiveSwitchCircularBuffer class.

Parameters
lengthThe length.
latencyThe latency.

◆ circularBufferWithLength:latency:littleEndian:

+ (FMLiveSwitchCircularBuffer*) circularBufferWithLength: (int)  length
latency: (int)  latency
littleEndian: (bool)  littleEndian 

Initializes a new instance of the FMLiveSwitchCircularBuffer class.

Parameters
lengthThe length.
latencyThe latency.
littleEndianWhether the data is little-endian.

◆ initWithLength:latency:

- (instancetype) initWithLength: (int)  length
latency: (int)  latency 

Initializes a new instance of the FMLiveSwitchCircularBuffer class.

Parameters
lengthThe length.
latencyThe latency.

◆ initWithLength:latency:littleEndian:

- (instancetype) initWithLength: (int)  length
latency: (int)  latency
littleEndian: (bool)  littleEndian 

Initializes a new instance of the FMLiveSwitchCircularBuffer class.

Parameters
lengthThe length.
latencyThe latency.
littleEndianWhether the data is little-endian.

◆ latency

- (int) latency

Gets the latency.

◆ length

- (int) length

Gets the length.

◆ littleEndian

- (bool) littleEndian

Gets whether the data is little-endian.

◆ readOffset

- (int) readOffset

Gets the read offset.

◆ readWithLength:

- (FMLiveSwitchDataBuffer*) readWithLength: (int)  length

Reads data from the buffer.

Parameters
lengthThe number of bytes to read.

◆ writeOffset

- (int) writeOffset

Gets the read offset.

◆ writeWithBuffer:

- (void) writeWithBuffer: (FMLiveSwitchDataBuffer *)  buffer

Writes data to the buffer.

Parameters
bufferThe data to write.