Tao.Sdl SDK Documentation

Sdl.SDL_MixAudio Method 

Mix audio data.

[Visual Basic]
Public Shared Sub SDL_MixAudio( _
   ByVal dst As IntPtr, _
   ByVal src As IntPtr, _
   ByVal len As Integer, _
   ByVal volume As Integer _
)
[C#]
public static void SDL_MixAudio(
   IntPtr dst,
   IntPtr src,
   int len,
   int volume
);

Parameters

dst
src
len
volume

Remarks

This function takes two audio buffers of len bytes each of the playing audio format and mixes them, performing addition, volume adjustment, and overflow clipping. The volume ranges from 0 to SDL_MIX_MAXVOLUME 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.

Note: 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.

            void SDL_MixAudio(Uint8 *dst, Uint8 *src, Uint32 len, int volume)
            

See Also

Sdl Class | Tao.Sdl Namespace | SDL_OpenAudio