mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-16 08:42:28 +00:00
bluedroid: avoid compile warnings for set but unused vars
This commit is contained in:
parent
6704d3d7a9
commit
f7f65e655c
33
3rd-party/bluedroid/encoder/srce/sbc_encoder.c
vendored
33
3rd-party/bluedroid/encoder/srce/sbc_encoder.c
vendored
@ -301,7 +301,7 @@ void SBC_Encoder_Init(SBC_ENC_PARAMS *pstrEncParams)
|
|||||||
UINT16 s16SamplingFreq; /*temp variable to store smpling freq*/
|
UINT16 s16SamplingFreq; /*temp variable to store smpling freq*/
|
||||||
SINT16 s16Bitpool; /*to store bit pool value*/
|
SINT16 s16Bitpool; /*to store bit pool value*/
|
||||||
// SINT16 s16BitRate; /*to store bitrate*/
|
// SINT16 s16BitRate; /*to store bitrate*/
|
||||||
SINT16 s16FrameLen; /*to store frame length*/
|
// SINT16 s16FrameLen; /*to store frame length*/
|
||||||
UINT16 HeaderParams;
|
UINT16 HeaderParams;
|
||||||
|
|
||||||
pstrEncParams->u8NumPacketToEncode = 1; /* default is one for retrocompatibility purpose */
|
pstrEncParams->u8NumPacketToEncode = 1; /* default is one for retrocompatibility purpose */
|
||||||
@ -312,15 +312,17 @@ void SBC_Encoder_Init(SBC_ENC_PARAMS *pstrEncParams)
|
|||||||
else
|
else
|
||||||
pstrEncParams->s16NumOfChannels = 2;
|
pstrEncParams->s16NumOfChannels = 2;
|
||||||
|
|
||||||
|
/* BK4BTSTACK_CHANGE START */
|
||||||
/* Bit pool calculation */
|
/* Bit pool calculation */
|
||||||
if (pstrEncParams->s16SamplingFreq == SBC_sf16000)
|
// if (pstrEncParams->s16SamplingFreq == SBC_sf16000)
|
||||||
s16SamplingFreq = 16000;
|
// s16SamplingFreq = 16000;
|
||||||
else if (pstrEncParams->s16SamplingFreq == SBC_sf32000)
|
// else if (pstrEncParams->s16SamplingFreq == SBC_sf32000)
|
||||||
s16SamplingFreq = 32000;
|
// s16SamplingFreq = 32000;
|
||||||
else if (pstrEncParams->s16SamplingFreq == SBC_sf44100)
|
// else if (pstrEncParams->s16SamplingFreq == SBC_sf44100)
|
||||||
s16SamplingFreq = 44100;
|
// s16SamplingFreq = 44100;
|
||||||
else
|
// else
|
||||||
s16SamplingFreq = 48000;
|
// s16SamplingFreq = 48000;
|
||||||
|
/* BK4BTSTACK_CHANGE END */
|
||||||
|
|
||||||
if ( (pstrEncParams->s16ChannelMode == SBC_JOINT_STEREO)
|
if ( (pstrEncParams->s16ChannelMode == SBC_JOINT_STEREO)
|
||||||
|| (pstrEncParams->s16ChannelMode == SBC_STEREO) )
|
|| (pstrEncParams->s16ChannelMode == SBC_STEREO) )
|
||||||
@ -333,15 +335,14 @@ void SBC_Encoder_Init(SBC_ENC_PARAMS *pstrEncParams)
|
|||||||
// + ( (pstrEncParams->s16ChannelMode - 2) *
|
// + ( (pstrEncParams->s16ChannelMode - 2) *
|
||||||
// pstrEncParams->s16NumOfSubBands ) )
|
// pstrEncParams->s16NumOfSubBands ) )
|
||||||
// / pstrEncParams->s16NumOfBlocks) );
|
// / pstrEncParams->s16NumOfBlocks) );
|
||||||
|
|
||||||
s16Bitpool = pstrEncParams->s16BitPool;
|
s16Bitpool = pstrEncParams->s16BitPool;
|
||||||
/* BK4BTSTACK_CHANGE END */
|
|
||||||
s16FrameLen = 4 + (4*pstrEncParams->s16NumOfSubBands*
|
|
||||||
pstrEncParams->s16NumOfChannels)/8
|
|
||||||
+ ( ((pstrEncParams->s16ChannelMode - 2) *
|
|
||||||
pstrEncParams->s16NumOfSubBands)
|
|
||||||
+ (pstrEncParams->s16NumOfBlocks * s16Bitpool) ) / 8;
|
|
||||||
|
|
||||||
/* BK4BTSTACK_CHANGE START */
|
// s16FrameLen = 4 + (4*pstrEncParams->s16NumOfSubBands*
|
||||||
|
// pstrEncParams->s16NumOfChannels)/8
|
||||||
|
// + ( ((pstrEncParams->s16ChannelMode - 2) *
|
||||||
|
// pstrEncParams->s16NumOfSubBands)
|
||||||
|
// + (pstrEncParams->s16NumOfBlocks * s16Bitpool) ) / 8;
|
||||||
// s16BitRate = (8 * s16FrameLen * s16SamplingFreq)
|
// s16BitRate = (8 * s16FrameLen * s16SamplingFreq)
|
||||||
// / (pstrEncParams->s16NumOfSubBands *
|
// / (pstrEncParams->s16NumOfSubBands *
|
||||||
// pstrEncParams->s16NumOfBlocks * 1000);
|
// pstrEncParams->s16NumOfBlocks * 1000);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user