C++ Miniaudio and Opus Audio Codec Assistance -- 2

Job ID: 39183366

Budget: $30 – $250 AUD

NO AI GENERATED BIDS, OR YOU WILL BE IGNORED
CANNED RESPONSES WILL BE IGNORED

I'm seeking a C++ expert with experience in working with the Opus audio codec.
https://github.com/xiph/opus
https://github.com/mackron/miniaudio

Basically I'm trying to read two streams of music, encode/decode them using Opus and then play them both together. However, with my code, I can hear static in the background when I mix the two audio streams together. I'm using Opus encoding because I will be sending the music data over the network.

I need someone to check this code to see why there is static and noise in the background, and to see if I'm using the Opus encode/decode methods correctly.

I tried using AI/ChatGPT and unfortunately, it didn't help much.

I attached my code, please let me know if you can fix this.

NO AI GENERATED BIDS, OR YOU WILL BE IGNORED
CANNED RESPONSES WILL BE IGNORED
Related categories: C Programming C++ Programming