Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stereo version #17

Open
thanks-for-your-help opened this issue May 8, 2023 · 0 comments
Open

Stereo version #17

thanks-for-your-help opened this issue May 8, 2023 · 0 comments

Comments

@thanks-for-your-help
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant