Skip to content

Stereo version #17

@thanks-for-your-help

Description

@thanks-for-your-help

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions