mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 04:20:20 +00:00
sbc: store 0x0000 as frame header
This commit is contained in:
parent
7294d0093f
commit
5fff3cef91
11
3rd-party/bluedroid/encoder/srce/sbc_packing.c
vendored
11
3rd-party/bluedroid/encoder/srce/sbc_packing.c
vendored
@ -84,8 +84,10 @@ void EncPacking(SBC_ENC_PARAMS *pstrEncParams)
|
||||
pu8PacketPtr = pstrEncParams->pu8NextPacket; /*Initialize the ptr*/
|
||||
|
||||
/* BK4BTSTACK_CHANGE START */
|
||||
uint8_t * reserved_ptr = (void*) 0;
|
||||
if (pstrEncParams->mSBCEnabled){
|
||||
*pu8PacketPtr++ = (UINT8)0xAD; /*Sync word*/
|
||||
reserved_ptr = pu8PacketPtr;
|
||||
} else {
|
||||
*pu8PacketPtr++ = (UINT8)0x9C; /*Sync word*/
|
||||
}
|
||||
@ -237,6 +239,15 @@ void EncPacking(SBC_ENC_PARAMS *pstrEncParams)
|
||||
u8CRC = 0x0F;
|
||||
s32LoopCount = s32Sb >> 1;
|
||||
|
||||
/* BK4BTSTACK_CHANGE START */
|
||||
if (reserved_ptr){
|
||||
// overwrite fixed values for mSBC before CRC calculation
|
||||
*reserved_ptr++ = 0;
|
||||
*reserved_ptr = 0;
|
||||
}
|
||||
/* BK4BTSTACK_CHANGE END */
|
||||
|
||||
|
||||
/*
|
||||
The loops is run from the start of the packet till the scale factor
|
||||
parameters. In case of JS, 'join' parameter is included in the packet
|
||||
|
Loading…
x
Reference in New Issue
Block a user