Photon C++ Client API
5.0.7.3
|
Utility class to re-frame audio packets. More...
Public Member Functions | |
Framer (int frameSize) | |
Create new Framer instance. More... | |
int | count (int bufLen) const |
Gets the number of frames available after adding bufLen samples. More... | |
void | frame (const Buffer< T > &buf, void *opaque, void(*op)(void *, const Buffer< T > &)) |
Appends the provided buffer to any preexistent samples from a previous call (if any), frames the result of the addition and calls the provided callback once for each full frame, until there are not enough remaining samples to fill a complete frame, then stores any remaining samples for the next call. More... | |
Utility class to re-frame audio packets.
int count | ( | int | bufLen | ) | const |
Gets the number of frames available after adding bufLen samples.
bufLen | Number of samples that would be added. |
Appends the provided buffer to any preexistent samples from a previous call (if any), frames the result of the addition and calls the provided callback once for each full frame, until there are not enough remaining samples to fill a complete frame, then stores any remaining samples for the next call.
buf | Array of samples to add. |
opaque | A pointer to custom data that should be forwarded to the callback. |
op | The callback to call. |