Commit 9af582a6beeec100e665775a2a2c86b7276d3d4e

Authored by LuoZheSi
1 parent e1587f5e

style(optek link mic):modify two compiled issues

... ... @@ -1505,7 +1505,7 @@ void taskDec(void *pvParameters)
1505 1505 #ifdef OPL_MODE_SWF
1506 1506 if (decode_type == DECODE_SBC || app_main_data.media == MEDIA_USB_DEVICE)
1507 1507 {
1508   -
  1508 +
1509 1509 }
1510 1510 else
1511 1511 #endif
... ... @@ -1726,6 +1726,7 @@ void taskDec(void *pvParameters)
1726 1726 {
1727 1727 if (app_main_data.share_link_role == SL_ROLE_MASTER)
1728 1728 {
  1729 + #ifdef LC3_DECODE_ENABLE
1729 1730 U16 dec_len;
1730 1731 //if (master_rev_flag)
1731 1732 {
... ... @@ -1744,7 +1745,8 @@ void taskDec(void *pvParameters)
1744 1745 {
1745 1746 //DBG_Printf("usbdev upstream overflow\r\n");
1746 1747 }
1747   - }
  1748 + }
  1749 + #endif
1748 1750 }
1749 1751 }
1750 1752 #else
... ...
... ... @@ -176,7 +176,44 @@ void csbm_tx_init(U16 sample_rate,U8 bt_src)
176 176 bc_tx_data.last_tx_len = 0;
177 177
178 178 #ifdef OPL_SLAVE_ENBALE
179   - #ifndef OPL_MODE_WIRELESS_MIC
  179 + #ifdef OPL_MODE_WIRELESS_MIC
  180 + if (app_main_data.share_link_role == SL_ROLE_SLAVE)
  181 + {
  182 + XA_ERRORCODE xa_lc3_enc_main_init(U32 bitrate,U16 samplerate,U8 channels,float frame_Time_ms);
  183 +
  184 + float ptms;
  185 + int bitrate;
  186 +
  187 + if (optek_link_mode == WIRELESS_MIC_PT2P5MS_T7R1 || optek_link_mode == WIRELESS_MIC_48K_PT2P5MS_T7R1M)
  188 + {
  189 + ptms = 2.5;
  190 + bitrate = 80000;
  191 + }
  192 + else if (optek_link_mode == WIRELESS_MIC_PT2P5MS_LP)
  193 + {
  194 + ptms = 2.5;
  195 + bitrate = 96000;
  196 + }
  197 + else if (optek_link_mode == WIRELESS_MIC_PT5MS_LP || optek_link_mode == WIRELESS_MIC_PT5MS_T10_R2_LP || optek_link_mode == WIRELESS_MIC_48K_PT5MS_T10_R2M_LP)
  198 + {
  199 + ptms = 5;
  200 + bitrate = 80000;
  201 + }
  202 + else
  203 + {
  204 + ptms = 2.5;
  205 + bitrate = 96000;
  206 + }
  207 +
  208 + if (xa_lc3_enc_main_init(bitrate,sample_rate,1,ptms) != XA_NO_ERROR)
  209 + {
  210 + DBG_Printf("lc3 enc init error\n\r");
  211 + }
  212 +
  213 + //spk_out_sync_w_tx_status = SPK_AND_TX_SYNCING;
  214 + return;
  215 + }
  216 + #else
180 217 if (app_main_data.share_link_role == SL_ROLE_SLAVE)
181 218 {
182 219 #ifdef OPL_MODE_TWO_WAY
... ... @@ -277,45 +314,6 @@ extern FIFO audio_delay_fifo;
277 314 DBG_Printf("lc3 enc init error\n\r");
278 315 }
279 316 }
280   -
281   - #elif defined OPL_MODE_WIRELESS_MIC
282   -
283   - if (app_main_data.share_link_role == SL_ROLE_SLAVE)
284   - {
285   - XA_ERRORCODE xa_lc3_enc_main_init(U32 bitrate,U16 samplerate,U8 channels,float frame_Time_ms);
286   -
287   - float ptms;
288   - int bitrate;
289   -
290   - if (optek_link_mode == WIRELESS_MIC_PT2P5MS_T7R1 || optek_link_mode == WIRELESS_MIC_48K_PT2P5MS_T7R1M)
291   - {
292   - ptms = 2.5;
293   - bitrate = 80000;
294   - }
295   - else if (optek_link_mode == WIRELESS_MIC_PT2P5MS_LP)
296   - {
297   - ptms = 2.5;
298   - bitrate = 96000;
299   - }
300   - else if (optek_link_mode == WIRELESS_MIC_PT5MS_LP || optek_link_mode == WIRELESS_MIC_PT5MS_T10_R2_LP || optek_link_mode == WIRELESS_MIC_48K_PT5MS_T10_R2M_LP)
301   - {
302   - ptms = 5;
303   - bitrate = 80000;
304   - }
305   - else
306   - {
307   - ptms = 2.5;
308   - bitrate = 96000;
309   - }
310   -
311   - if (xa_lc3_enc_main_init(bitrate,sample_rate,1,ptms) != XA_NO_ERROR)
312   - {
313   - DBG_Printf("lc3 enc init error\n\r");
314   - }
315   -
316   - //spk_out_sync_w_tx_status = SPK_AND_TX_SYNCING;
317   - return;
318   - }
319 317 #endif
320 318
321 319 #ifdef OPL_MODE_TWO_WAY
... ... @@ -501,9 +499,9 @@ void csbm_put_tx_unencoded_data(short *ptr,U16 len)
501 499 int xa_lc3_enc_frame(U16 *pInBuf, U32 samples, U8 **pOutBuf, U32 *pOutDataLen);
502 500 U8 *plc3;
503 501
504   -
505 502 if (app_main_data.share_link_role == SL_ROLE_SLAVE)
506 503 {
  504 + #ifdef OPL_SLAVE_ENBALE
507 505 #ifdef OPL_MODE_TWO_WAY
508 506 //first step 48K to 24K
509 507 short *pIn = ptr;
... ... @@ -570,6 +568,7 @@ void csbm_put_tx_unencoded_data(short *ptr,U16 len)
570 568 bc_tx_data.tx_len = pOutDataLen;
571 569 memset(ptr,0,len<<2);//mute local output
572 570 #endif
  571 + #endif
573 572 }
574 573 else
575 574 {
... ...
Please register or login to post a comment