esp32_SoundRecorder icon indicating copy to clipboard operation
esp32_SoundRecorder copied to clipboard

Stereo version

Open thanks-for-your-help opened this issue 1 year ago • 0 comments

Hello,

I try to modify this post for doing a stereo version.

I modify the wav header as :

header[22] = 0x02; // stereo header[28] = 0x10; // Byte/sec = (44100x16x2)/8 = 176400 STEREO header[29] = 0xB1; header[30] = 0x02; header[31] = 0x00; header[32] = 0x04; // 16bit stereo

I modify too const int waveDataSize = record_time * 176400; // (44100x16x2)/8 = 176400

The generated file is indeed stereo. There is audio on both channels. The waveform looks identical. The speed is twice as fast. I think it must miss the bytes of the second channel.

Could you help me with some code ?

Could you explain theses two lines please :

const int numCommunicationData = 8000; // Why 8000 ?
const int numPartWavData = numCommunicationData/4; // Why ?

Best regards

Loïc

thanks-for-your-help avatar May 08 '23 09:05 thanks-for-your-help