components/bt: Enable mSBC and add decoder and encoder

This commit is contained in:
baohongde
2019-05-14 15:19:07 +08:00
parent 20758443df
commit dd906a91a5
14 changed files with 416 additions and 58 deletions

View File

@@ -47,7 +47,8 @@ INLINE OI_STATUS internal_DecoderReset(OI_CODEC_SBC_DECODER_CONTEXT *context,
OI_UINT32 decoderDataBytes,
OI_BYTE maxChannels,
OI_BYTE pcmStride,
OI_BOOL enhanced)
OI_BOOL enhanced,
OI_BOOL msbc_enable)
{
OI_UINT i;
OI_STATUS status;
@@ -65,6 +66,12 @@ INLINE OI_STATUS internal_DecoderReset(OI_CODEC_SBC_DECODER_CONTEXT *context,
}
#endif
if (msbc_enable) {
context->sbc_mode = OI_SBC_MODE_MSBC;
} else {
context->sbc_mode = OI_SBC_MODE_STD;
}
status = OI_CODEC_SBC_Alloc(&context->common, decoderData, decoderDataBytes, maxChannels, pcmStride);
if (!OI_SUCCESS(status)) {