SDL Wiki
(This is the legacy documentation for SDL2, the previous stable version; SDL3 is the current stable version.)

SDL_MixAudio

This function is a legacy means of mixing audio.

Header File

Defined in SDL_audio.h

Syntax

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

Function Parameters

Uint8 * dst the destination for the mixed audio.
const Uint8 * src the source audio buffer to be mixed.
Uint32 len the length of the audio buffer in bytes.
int volume ranges from 0 - 128, and should be set to SDL_MIX_MAXVOLUME for full audio volume.

Remarks

This function is equivalent to calling...

SDL_MixAudioFormat(dst, src, format, len, volume);

...where format is the obtained format of the audio device from the legacy SDL_OpenAudio() function.

Version

This function is available since SDL 2.0.0.

See Also


CategoryAPI, CategoryAPIFunction, CategoryAudio


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.