I've made a "wave reator" to simulate old sound stuff (square, saw, sinus and noise). Now I want to write a function to mix the waves.

I did something similar to:
Code:
(* Pseudo Pascal *)
  FUNCTION MixWaves (Wave1, Wave2: ARRAY OF BYTE): ARRAY OF BITE
  BEGIN
    FOR B := 1 TO Length (Wave1) DO
      Result[B] := (Wave1[B] + Wave2[B]) DIV 2;
  END;
It almost works but the result sounds "softer" (I mean with less volume).

What function should I use?