From bd8936acc1c269c80059a58aa3bbcdeb6cc07ee3 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Sun, 9 Jul 2023 19:21:30 +0800 Subject: [PATCH] update --- demo/ac_sound_capture1/ac_sound_capture1.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/ac_sound_capture1/ac_sound_capture1.cpp b/demo/ac_sound_capture1/ac_sound_capture1.cpp index 8367409..4fb3bc0 100644 --- a/demo/ac_sound_capture1/ac_sound_capture1.cpp +++ b/demo/ac_sound_capture1/ac_sound_capture1.cpp @@ -153,7 +153,7 @@ void wavWriteVoice(string filename, uint32_t sample_rate, uint16_t bits_per_samp void sound_capture_callback(int32_t* voicedata, uint32_t len) { printf("sound_capture_callback:%d\n", len); for (size_t i = 0; i < len; i++) { - voicedata[i] = voicedata[i] - 420079616; //声望录音设备AC信号有一个直流偏移分量 + voicedata[i] = voicedata[i] << 8; //底层采集的数据是24位,左移8位转换成32位 } wavWriteVoice("record.wav", 96000, 32, 1, (char*)voicedata, len * sizeof(int32_t));