Okay, this might be a silly question but... it'd be sillier not to ask it.
On GIMP, there are two different layer modes for doing almost the same thing: Addition and Screen.
They have a big practical difference, though - Addition simply adds the pixel values of the layer on top to the pixel values of the layer below, which can result to clipping if the values go over 255 for each channel.
Screen mode is more sophisticated, however. It never causes clipping, because it checks how much room there is available to the clipping point, then scales the top layer's pixel values to fill the available scale proportionally to the top layer's pixel values.
Example: I have two layers; bottom layer is a 75% grey (192,192,192 or #c0c0c0) and top layer is 50% grey (128,128,128 or #808080).
Additive blending mode would count the pixel values directly together and end up with clipped white at 192+128=320>255.
Screen mode first determines how much available values there are before clipping occurs:
255-192 = 63
Then it determines how much it wants to increase the value perceptually. The 50% grey would mean a 50% increase of available values. In this case,
63 * 128/255 = 31.6235294 = ~32
...so the final pixel value is
192 + 32 = 224
and the colour ends up as (224,224,224 or #e0e0e0).
Mathematically, it goes as follows:
RGB(out) = RGB(bottom) + ( [ RGB(white) - RGB(bottom) ] * [ RGB(top) / RGB(white) ] )
Now, for image editing, every RGB variable consists of three numerals for RGB, four with RGBA (but that works a bit differently as the alpha channel of top layer is a multiplier for the RGB values in 0,1 range...) and the range for each channel is 0,255.
For audio, we have only one value (sample) but lots of them coming in at high rate of speed (typically 44100 in one second minimum) and the size of individual sample is usually 16bit, 24bit or 32bit integer. Most commonly the sound data is in 44k16bit format; however while processing the sound, they can either be converted to higher sample size or kept at the same 16 bit (at slight sacrifice of rounding errors).
Regardless, with additive mixing of two samples, the sample values are just added together and if they go over the clipping threshold you end up with clipping sound.
With a "screen" type mixing of samples, you will never get clipping; the volume will just asymptotically approach 0 dB. Of course sound is a bit different as waveform contains both positive and negative values, while image data is limited to positive values; however the equation can probably be adjusted to take negative values into account and prevent clipping for negative values as well.
Now, the questions:
Is there some flaw in my thinking as to why this wouldn't work? If yes, what is it?
If this should theoretically work, then:
Does OpenAL support this type of mixing that never clips? If it is, how to use it?
If this is not possible, then I have to ask... why not? Is it too resource-intensive? It wouldn't seem so, as it's all rather simple maths - you just need to do it pretty fast (at least 44100 times per second multiplied by the amount of sounds used).