Commit 856470fc0e946a1e19aa02f37c000e4d6560242a

Authored by luozhesi
1 parent d64902dc

improve subwoofer

  1 +{
  2 + "files.associations": {
  3 + "xutility": "c"
  4 + }
  5 +}
\ No newline at end of file
... ...
... ... @@ -155,14 +155,14 @@ int pcm_dec_decode_frame(U8 **pout,U16 *plen)
155 155 #ifdef OPL_MODE_TWO_WAY
156 156 in_out_offset = 180;
157 157 #else
158   - in_out_offset = 16;
  158 + in_out_offset = 32;
159 159 #endif
160 160 //i32 count = ((AD_PCM_BLOCK_SIZE/2-16) - dma0_cnt);
161 161 i32 count = ((AD_PCM_BLOCK_SIZE/2-in_out_offset) - dma0_cnt);
162 162
163 163 discard_frame_cnt = 3;
164 164
165   - if (count < -2 || count > 2)
  165 + if (count < -8 || count > 8)
166 166 {
167 167 //adj_outsamples = count>>1;
168 168 memset(pDecOut,0,AD_PCM_BLOCK_SIZE*2);
... ... @@ -172,15 +172,15 @@ int pcm_dec_decode_frame(U8 **pout,U16 *plen)
172 172 {
173 173 count = AD_PCM_BLOCK_SIZE/4;
174 174 }
175   - else if (count < -in_out_offset)
  175 + else if (count < (i32)(-in_out_offset))
176 176 {
177   - count = -in_out_offset;
  177 + count = (i32)(-in_out_offset);
178 178 }
179 179
180 180 DBG_Printf("adj count:%d\r\n",count);
181 181
182 182 *pout = pDecOut;
183   - *plen = AD_PCM_BLOCK_SIZE + (count/2)*4;
  183 + *plen = AD_PCM_BLOCK_SIZE + (count/8)*16;
184 184
185 185 return DECODE_SUCCESS;
186 186 }
... ... @@ -1652,14 +1652,14 @@ void taskDec(void *pvParameters)
1652 1652 //optek_hifi2_16b_to_24b(pDacbuf,pDacbuf,(samples<<1));
1653 1653 }
1654 1654 #endif
1655   -
  1655 +/*
1656 1656 if (pOut_up != NULL)
1657 1657 {
1658 1658 app_main_data.playing_stream_chans = 1;
1659 1659 len >>= 1;
1660 1660 pOut = pOut_up;
1661 1661 }
1662   -
  1662 +*/
1663 1663 while(len > max_out_len)
1664 1664 {
1665 1665 slice <<= 1;
... ...
... ... @@ -131,8 +131,8 @@
131 131
132 132 /*********Choose one*************/
133 133 //#define OPL_MODE_SINGLE_WAY
134   -#define OPL_MODE_TWO_WAY
135   -//#define OPL_MODE_SWF
  134 +//#define OPL_MODE_TWO_WAY
  135 +#define OPL_MODE_SWF
136 136
137 137 #if (defined OPL_MODE_TWO_WAY || (defined OPL_MODE_SINGLE_WAY && defined OPL_MASTER_ENABLE))
138 138 #define LC3_ENCODE_ENABLE
... ...
Please register or login to post a comment