I was using OpenAL, but some idiot thought it’d be funny to make it impossible to manually pan sounds, so I hunted down SDL_Mixer and tried to use it.
It seems it has a single rather deeply rooted dependency on SDL itself:
#define Mix_LoadWAV(file) Mix_LoadWAV_RW(SDL_RWFromFile(file, “rb”), 1)
This _RW stuff is the only way to make the library actually parse what’s in the file properly it seems, wide characters be damned. So I try and include the whole of SDL (MASSIVE overkill for what I want, everything else it does is already handled by other libraries) and it messes with my stdout, piping it to a pair of text files. Why. Why do you people think this is a good idea. Here’s a hint: it’s not. Libraries should simplify functionality, not change arbitrary parts of the language that bear no relation whatsoever to said functionality. So I include the .c file instead of the library as often advised and although I’ve made no changes to it, it says it found an undefined reference to SDL_Main, but provides only an offset in the main.o object file so I don’t know what’s actually going on.
So:
Can I use sdl_mixer’s full functionality without including a huge library for no real benefit?
If not, can I at least stop this redirection madness? You want this functionality? Fine. It’s stupid in that you can’t see messages as the program’s running, it probably isn’t any good for devices with flash storage to be opening and closing two files for no reason, but fine. I don’t, and requiring a total recompile to remove it is absurd.
AAAAAAAAARGH! (16 hours now trying to find a library that a) works b) lets me adjust the left and right volume of a sound manually c) has a license that doesn’t require me to make source available)