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

Data Structures

struct  LC3EncodeInput_t
 LC3 encoder input PCM data structure. More...
 
struct  LC3EncodeOutput_t
 LC3 encoder output data structure. More...
 
struct  LC3DecodeInput_t
 LC3 decoder input bit stream structure. More...
 
struct  LC3DecodeOutput_t
 LC3 decoder output PCM structure. More...
 

Typedefs

typedef void * LC3EncoderHandle_t
 LC3 encoder handle type.
 
typedef void * LC3DecoderHandle_t
 LC3 decoder handle type.
 

Enumerations

enum  LC3FrameSizeConfig_t { LC3FrameSize10MsConfig , LC3FrameSize7_5MsConfig , LC3FrameSizeBothConfig }
 Frame Size for configuration. More...
 
enum  LC3FrameSize_t { LC3FrameSize10Ms , LC3FrameSize7_5Ms }
 Session Frame Size. More...
 
enum  LC3BFI_t { GoodFrame , BadFrame }
 Bad Frame Indicator (BFI). More...
 

Functions

int32_t LC3Initialize (uint8_t encoderSampleRates, uint8_t decoderSampleRates, LC3FrameSizeConfig_t frameSizeConfig, uint8_t uniqueSessions, uint8_t *buffer, uint32_t *bufferSize)
 Initializes the LC3 Codec.
 
int32_t LC3Deinitialize (void)
 Deinitializes the LC3 Codec.
 
LC3EncoderHandle_t LC3EncodeSessionOpen (uint16_t sampleRate, uint8_t bitsPerSample, LC3FrameSize_t frameSize, uint8_t *buffer, uint16_t *bufferSize, int32_t *result)
 Opens and initializes an LC3 Encoder session.
 
int32_t LC3EncodeSessionData (LC3EncoderHandle_t encodeHandle, LC3EncodeInput_t *encodeInput, LC3EncodeOutput_t *encodeOutput)
 Encodes a frame of data using LC3.
 
void LC3EncodeSessionClose (LC3EncoderHandle_t encodeHandle)
 Closes an LC3 Encoder session.
 
LC3DecoderHandle_t LC3DecodeSessionOpen (uint16_t sampleRate, uint8_t bitsPerSample, LC3FrameSize_t frameSize, uint8_t *buffer, uint16_t *bufferSize, int32_t *result)
 Opens and initializes an LC3 Decoder session.
 
int32_t LC3DecodeSessionData (LC3DecoderHandle_t decodeHandle, LC3DecodeInput_t *decodeInput, LC3DecodeOutput_t *decodeOutput)
 Decodes a frame of data using LC3.
 
void LC3DecodeSessionClose (LC3DecoderHandle_t decodeHandle)
 Closes an LC3 Decoder session.
 
uint16_t LC3BitstreamBuffersize (uint16_t sampleRate, uint32_t maxBitRate, LC3FrameSize_t frameSize, int32_t *result)
 Calculates the buffer size required for bit stream data.
 
uint16_t LC3PCMBuffersize (uint16_t sampleRate, uint8_t bitDepth, LC3FrameSize_t frameSize, int32_t *result)
 Calculates the buffer size required for PCM data.
 

LC3 Result Codes

#define LC3_ERROR_OFFSET   (-5000)
 Offset for LC3 error values.
 
#define LC3_RESULT_NO_ERROR   (0)
 Success.
 
#define LC3_RESULT_INVALID_PARAMETER   ((LC3_ERROR_OFFSET)-1)
 Error: invalid parameter detected.
 
#define LC3_RESULT_INSUFFICIENT_RESOURCES   ((LC3_ERROR_OFFSET)-2)
 Error: not enough memory available.
 
#define LC3_RESULT_NOT_INITIALIZED   ((LC3_ERROR_OFFSET)-3)
 Error: not initialized before use.
 
#define LC3_RESULT_UNKNOWN_ERROR   ((LC3_ERROR_OFFSET)-4)
 Error: unknown error detected.
 
#define LC3_RESULT_INVALID_BITRATE   ((LC3_ERROR_OFFSET)-5)
 Error: invalid bitrate value.
 
#define LC3_RESULT_INPUT_BUFFER_TOO_SMALL   ((LC3_ERROR_OFFSET)-6)
 Error: passed buffer size too small for input data.
 
#define LC3_RESULT_OUTPUT_BUFFER_TOO_SMALL   ((LC3_ERROR_OFFSET)-7)
 Error: passed buffer size too small for output data.
 
#define LC3_RESULT_INVALID_BITSPERSAMPLE   ((LC3_ERROR_OFFSET)-8)
 Error: invalid bits per sample value.
 
#define LC3_RESULT_INVALID_SAMPLERATE   ((LC3_ERROR_OFFSET)-9)
 Error: invalid sample rate value.
 
#define LC3_RESULT_BITERRORCONDITION   ((LC3_ERROR_OFFSET)-10)
 Error: bit error condition detected in bit stream data.
 
#define LC3_RESULT_FEATURE_NOT_SUPPORTED   ((LC3_ERROR_OFFSET)-11)
 Error: feature not supported in this build.
 
#define LC3_RESULT_STILL_IN_USE   ((LC3_ERROR_OFFSET)-12)
 Error: Sessions not closed, buffer still in use.
 
#define LC3_RESULT_ALREADY_INITIALIZED   ((LC3_ERROR_OFFSET)-13)
 Error: Codec already initialized, call LC3Deinitialize first.
 

LC3 Sample Rate Bits

#define LC3_SAMPLE_RATE_NONE   (0x00)
 No sample rate selected.
 
#define LC3_SAMPLE_RATE_8_KHZ   (0x01)
 8 kHz sample rate bit.
 
#define LC3_SAMPLE_RATE_16_KHZ   (0x02)
 16 kHz sample rate bit.
 
#define LC3_SAMPLE_RATE_24_KHZ   (0x04)
 24 kHz sample rate bit.
 
#define LC3_SAMPLE_RATE_32_KHZ   (0x08)
 32 kHz sample rate bit.
 
#define LC3_SAMPLE_RATE_441_KHZ   (0x10)
 44.1 kHz sample rate bit.
 
#define LC3_SAMPLE_RATE_48_KHZ   (0x20)
 48 kHz sample rate bit.
 
#define LC3_SAMPLE_RATE_ALL   (0x1F)
 All sample rates selected.
 

Detailed Description