Question

I was working on a game and needed to mix sound effects into BGM, using lib SDL2. Say I was working ONLY with wav files, would the basic SDL2 library serve it well, or I should install the adding-on library SDL_mixer ?

Was it helpful?

Solution

You should plan on using SDL2-mixer if you want to use compressed sound files. Wav are good for little sound effects, but if you plan on playing some background music too, you will need to use compressed sound file, because a Wav file for a 3 minutes sound is really big.

Like they said on their website : "SDL_mixer is a sample multi-channel audio mixer library." But, if you want only to play with wav files only, SDL2 can do it as well. Personally, I'll go with sdl2-mixer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top