FirstModulAR 0.1.0
Loading...
Searching...
No Matches
FMAR.Audio.MicrophoneCapturer.CircularBuffer< T > Class Template Reference

Circular buffer data structure for storing audio samples. More...

Public Member Functions

 CircularBuffer (int size)
 Initializes a new instance of the CircularBuffer class with the specified size.
 
void Enqueue (T item)
 Enqueues an item into the buffer.
 
void EnqueueArray (T[] items)
 Enqueues an array of items into the buffer.
 
Dequeue ()
 Dequeues an item from the buffer.
 
T[] DequeueArray (int count)
 Dequeues an array of items from the buffer.
 
Peek ()
 Peeks at the item at the head of the buffer without dequeuing it.
 
T[] PeekAll ()
 Peeks at all items in the buffer without dequeuing them.
 

Properties

int Count [get]
 Gets the number of items currently in the buffer.
 

Detailed Description

Circular buffer data structure for storing audio samples.

Template Parameters
TThe type of data to store in the buffer.

Constructor & Destructor Documentation

◆ CircularBuffer()

Initializes a new instance of the CircularBuffer class with the specified size.

Parameters
sizeThe size of the buffer.

Member Function Documentation

◆ Dequeue()

Dequeues an item from the buffer.

Returns
The dequeued item.
Exceptions
InvalidOperationExceptionThrown when the buffer is empty.

◆ DequeueArray()

T[] FMAR.Audio.MicrophoneCapturer.CircularBuffer< T >.DequeueArray ( int count)
inline

Dequeues an array of items from the buffer.

Parameters
countThe number of items to dequeue.
Returns
An array of dequeued items.
Exceptions
InvalidOperationExceptionThrown when the buffer does not contain enough items.

◆ Enqueue()

void FMAR.Audio.MicrophoneCapturer.CircularBuffer< T >.Enqueue ( T item)
inline

Enqueues an item into the buffer.

Parameters
itemThe item to enqueue.

◆ EnqueueArray()

void FMAR.Audio.MicrophoneCapturer.CircularBuffer< T >.EnqueueArray ( T[] items)
inline

Enqueues an array of items into the buffer.

Parameters
itemsThe array of items to enqueue.
Exceptions
InvalidOperationExceptionThrown when the input array is too large to fit in the buffer.

◆ Peek()

Peeks at the item at the head of the buffer without dequeuing it.

Returns
The item at the head of the buffer.
Exceptions
InvalidOperationExceptionThrown when the buffer is empty.

◆ PeekAll()

T[] FMAR.Audio.MicrophoneCapturer.CircularBuffer< T >.PeekAll ( )
inline

Peeks at all items in the buffer without dequeuing them.

Returns
An array of all items in the buffer.

Property Documentation

◆ Count

Gets the number of items currently in the buffer.


The documentation for this class was generated from the following file: