SDL API Reference SDL_MixAudio(3)
NAME
SDL_MixAudio - Mix audio data
SYNOPSIS
#include "SDL.h"
void SDL_MixAudio(Uint8 *dst, Uint8 *src, Uint32 len, int
volume);DESCRIPTION
This function takes two audio buffers of len bytes each ofthe playing audio format and mixes them, performing addi-
tion, volume adjustment, and overflow clipping. The volumeranges from 0 to SDL_MIX_MAXVOLUME and should be set to the
maximum value for full audio volume. Note this does notchange hardware volume. This is provided for convenience --
you can mix your own audio data. Note: Do not use this function for mixing together more than two streams of sample data. The output from repeatedapplication of this function may be distorted by clip-
ping, because there is no accumulator with greater range than the input (not to mention this being an inefficient way of doing it). Use mixing functions fromSDL_mixer, OpenAL, or write your own mixer instead.
SEE ALSO
SDL_OpenAudio
SDL Last change: Tue 11 Sep 2001, 22:58 1