|
40 | 40 | public class AudioRecordUtil implements EncoderListener, FLVListener, Handler.Callback { |
41 | 41 | private static final int DEFAULT_CHANNEL_CONFIG = AudioFormat.CHANNEL_IN_STEREO; //设置音频的录制的声道CHANNEL_IN_STEREO为双声道,CHANNEL_CONFIGURATION_MONO为单声道 |
42 | 42 | private static final int DEFAULT_AUDIO_FORMAT = AudioFormat.ENCODING_PCM_16BIT; //音频数据格式:PCM 16位每个样本。保证设备支持。PCM 8位每个样本。不一定能得到设备支持。 |
43 | | - private static final String TAG = AudioRecordUtil.class.getName() + "[IOT-XP2P]"; |
| 43 | + private static final String TAG = AudioRecordUtil.class.getName(); |
44 | 44 | private static final int MSG_START = 1; |
45 | 45 | private static final int MSG_STOP = 2; |
46 | 46 | private static final int MSG_REC_PLAY_PCM = 3; |
@@ -396,7 +396,7 @@ public void encodeG711(byte[] data) { } |
396 | 396 | @Override |
397 | 397 | public void onFLV(byte[] data) { |
398 | 398 | if (recorderState) { |
399 | | - Log.i(TAG, "===== XP2P.dataSend dataLen:" + data.length); |
| 399 | +// Log.d(TAG, "===== XP2P.dataSend dataLen:" + data.length); |
400 | 400 | XP2P.dataSend(deviceId, data, data.length); |
401 | 401 |
|
402 | 402 | if (executor.isShutdown()) return; |
@@ -433,7 +433,7 @@ private class RecordThread extends Thread { |
433 | 433 | public void run() { |
434 | 434 | while (recorderState) { |
435 | 435 | int read = audioRecord.read(buffer, 0, buffer.length); |
436 | | - Log.i(TAG, "audioRecord.read: "+read + ", buffer.length: " + buffer.length + ", recorderState: " + recorderState); |
| 436 | + Log.e(TAG, "audioRecord.read: "+read + ", buffer.length: " + buffer.length + ", recorderState: " + recorderState); |
437 | 437 | if (!VoiceChangerJNIBridge.isAvailable()) { |
438 | 438 | if (pitch != 0 && st != null) { |
439 | 439 | st.putBytes(buffer); |
|
0 commit comments