SDL Mixer Audio Randomly Gets Louder

88 views Asked by At

I wrote a C++ game using SDL 2.0 and SDL_Mixer. Sometimes when playing audio a sound randomly becomes louder. It seems to be when multiple sounds play at the same time, but I'm not sure why.

Here's the two functions I'm calling to play sounds in my game:

void Sounds::play(Mix_Chunk* sound)
{
    Mix_PlayChannel(-1, sound, 0);
}

void Sounds::play(Mix_Music* music)
{
    Mix_PlayMusic(music, 0);
}
0

There are 0 answers