nrfxlib API 2.8.99
Loading...
Searching...
No Matches

◆ LC3PCMBuffersize()

uint16_t LC3PCMBuffersize ( uint16_t sampleRate,
uint8_t bitDepth,
LC3FrameSize_t frameSize,
int32_t * result )

#include <lc3/codec/inc/LC3API.h>

Calculates the buffer size required for PCM data.

Returns the minimum buffer size in bytes needed to hold a frame of PCM data for the specified sample rate and bit depth. A bitDepth value in the range (16,24] uses a 3 byte/sample PCM output while (24,32] uses 4 bytes/sample.

Parameters
[in]sampleRateSample rate.
[in]bitDepthBit depth of generated PCM data.
[in]frameSizeFrame size of 7.5 or 10 msec.
[out]resultPointer to an LC3 Return Code integer.
Returns
PCM buffer size on success or 0 on error.