Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 461261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:57:25+00:00 2026-05-12T22:57:25+00:00

My question is not completely programming-related, but nevertheless I think SO is the right

  • 0

My question is not completely programming-related, but nevertheless I think SO is the right place to ask.

In my program I generate some audio data and save the track to a WAV file. Everything works fine with one sound generator. But now I want to add more generators and mix the generated audio data into one file. Unfortunately it is more complicated than it seems at first sight.
Moreover I didn’t find much useful information on how to mix a set of audio samples.

So is there anyone who can give me advice?

edit:

I’m programming in C++. But it doesn’t matter, since I was interested in the theory behind mixing two audio tracks. The problem I have is that I cannot just sum up the samples, because this often produces distorted sound.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T22:57:26+00:00Added an answer on May 12, 2026 at 10:57 pm

    I assume your problem is that for every audio source you’re adding in, you’re having to lower the levels.

    If the app gives control to a user, just let them control the levels directly. Hotness is their responsibility, not yours. This is “summing.”

    If the mixing is automated, you’re about to go on a journey. You’ll probably need compression, if not limiting. (Limiting is an extreme version of compression.)

    Note that anything you do to the audio (including compression and limiting) is a form of distortion, so you WILL have coloration of the audio. Your choice of compression and limiting algorithms will affect the sound.

    Since you’re not generating the audio in real time, you have the possibility of doing “brick wall” limiting. That’s because you have foreknowledge of the levels. Realtime limiting is more limited because you can’t know what’s coming up–you have to be reactive.

    Is this music, sound effects, voices, what?

    Programmers here deal with this all the time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Not completely a programming question, but its close enough so here goes: In Mac
This question might not seem programming related at first, but let me explain. I'm
I know that this is not a programming related question but what is the
Here is a question not directly related to programming. Being fed up with Microsoft
This question is not so much programming related as it is deployment related. I
I realize this question might not be that programming related, and that it by
I guess this is not quite a programming question, but it is bothering me
(This question is indirectly related to a programming issue I'm having; if you think
I'm new to audio programming so excuse me if I'm not using the right
Since my question from yesterday was perhaps not completely clear and I did not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.