Photon Voice  v2.8
English | 日本語 | 한국
Public Member Functions | List of all members
Framer< T > Class Template Reference

Utility class to re-frame audio packets. More...

Public Member Functions

 Framer (int frameSize)
 Create new Framer instance. More...
 
int Count (int bufLen)
 Get the number of frames available after adding bufLen samples. More...
 
IEnumerable< T[]> Frame (T[] buf)
 Append arbitrary-sized buffer and return available full frames. More...
 

Detailed Description

Utility class to re-frame audio packets.

Constructor & Destructor Documentation

Framer ( int  frameSize)

Create new Framer instance.

Member Function Documentation

int Count ( int  bufLen)

Get the number of frames available after adding bufLen samples.

Parameters
bufLenNumber of samples that would be added.
Returns
Number of full frames available when adding bufLen samples.
IEnumerable<T[]> Frame ( T[]  buf)

Append arbitrary-sized buffer and return available full frames.

Parameters
bufArray of samples to add.
Returns
Enumerator of full frames (might be none).