docs/man3/SDL_MixAudio.3
author Sam Lantinga <slouken@libsdl.org>
Wed, 08 Mar 2006 18:30:12 +0000
changeset 1486 9d77fc9d0ace
parent 181 e5bc29de3f0a
child 2283 546f7c1eb755
permissions -rw-r--r--
Re-added C runtime support for Visual C++ 5,6
slouken@181
     1
.TH "SDL_MixAudio" "3" "Tue 11 Sep 2001, 22:58" "SDL" "SDL API Reference" 
slouken@0
     2
.SH "NAME"
slouken@0
     3
SDL_MixAudio\- Mix audio data
slouken@0
     4
.SH "SYNOPSIS"
slouken@0
     5
.PP
slouken@0
     6
\fB#include "SDL\&.h"
slouken@0
     7
.sp
slouken@0
     8
\fBvoid \fBSDL_MixAudio\fP\fR(\fBUint8 *dst, Uint8 *src, Uint32 len, int volume\fR);
slouken@0
     9
.SH "DESCRIPTION"
slouken@0
    10
.PP
slouken@55
    11
This function takes two audio buffers of \fBlen\fR bytes each of the playing audio format and mixes them, performing addition, volume adjustment, and overflow clipping\&. The \fBvolume\fR ranges from 0 to \fBSDL_MIX_MAXVOLUME\fP and should be set to the maximum value for full audio volume\&. Note this does not change hardware volume\&. This is provided for convenience -- you can mix your own audio data\&.
slouken@181
    12
.PP
slouken@181
    13
.RS
slouken@181
    14
\fBNote:  
slouken@181
    15
.PP
slouken@181
    16
Do not use this function for mixing together more than two streams of sample data\&. The output from repeated application of this function may be distorted by clipping, 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 from SDL_mixer, OpenAL, or write your own mixer instead\&.
slouken@181
    17
.RE
slouken@0
    18
.SH "SEE ALSO"
slouken@0
    19
.PP
slouken@0
    20
\fI\fBSDL_OpenAudio\fP\fR
slouken@181
    21
...\" created by instant / docbook-to-man, Tue 11 Sep 2001, 22:58