|
2 | 2 |
|
3 | 3 | import android.Manifest; |
4 | 4 | import android.app.Activity; |
5 | | -import android.content.Intent; |
6 | 5 | import android.content.pm.PackageManager; |
7 | 6 | import android.content.res.AssetManager; |
8 | 7 | import android.media.AudioFormat; |
@@ -125,7 +124,7 @@ public void onCheckedChanged(RadioGroup group, int checkedId) { |
125 | 124 | initAudioFile(); |
126 | 125 | } |
127 | 126 |
|
128 | | - startActivity(new Intent(RtcActivity.this,AFRtcMainActivity.class)); |
| 127 | +// startActivity(new Intent(RtcActivity.this,AFRtcMainActivity.class)); |
129 | 128 | } |
130 | 129 |
|
131 | 130 | private void initAudioFile() { |
@@ -281,16 +280,16 @@ public void run() { |
281 | 280 | // WebRtcUtils.webRtcAgcProcess32k(nsProcessData, processData, nsProcessData.length); |
282 | 281 | // out.write(shortsToBytes(processData)); |
283 | 282 | } else { |
284 | | - short[] nsProcessData; |
| 283 | + short[] nsProcessData = new short[160]; |
285 | 284 | if (selectId == R.id.rb_16k) { |
286 | 285 | // nsProcessData = WebRtcNsUtils.webRtcNsProcess(mSampleRate, shortData.length, shortData); |
287 | 286 | // WebRtcUtils.webRtcAgcProcess(nsProcessData, processData, shortData.length); |
288 | 287 | // out.write(shortsToBytes(nsProcessData)); |
289 | 288 | } else if (selectId == R.id.rb_8k) { |
290 | 289 | Log.e("aaa", "shortData.length---->" + shortData.length); |
291 | | -// nsProcessData = WebRtcNsUtils.webRtcNsProcess(mSampleRate, shortData.length, shortData); |
| 290 | +// WebRtcNsUtils.WebRtcNsx_Process(WebRtcNs, shortData,1, nsProcessData); |
292 | 291 | // WebRtcUtils.webRtcAgcProcess(nsProcessData, processData, nsProcessData.length); |
293 | | -// out.write(shortsToBytes(nsProcessData)); |
| 292 | + out.write(shortsToBytes(nsProcessData)); |
294 | 293 | } |
295 | 294 | } |
296 | 295 |
|
|
0 commit comments