I can't seem to get SDL_Mixer to initialize with OGG support enabled. I know that I must link with libogg, libvorbis and libvorbisfile but it still won't work. I have .dylib
s, .framework
s and .a
s of these three libraries and I've tried them all.
I'm copying the dylibs/frameworks into the Frameworks folder of the app package in the build phases tab.
I have Runpath Search Paths
set to @executable_path/../Frameworks
in the build settings tab.
But Mix_Init(MIX_INIT_OGG)
keeps returning the error OGG support not available
.
I'm using the latest Homebrew versions of all of the mentioned libraries. I'm not sure what else to try.
I have a finished game with 300MB of wav
s as the music.
Update
I’ve managed to mix some Objective C with C++ and get some sound playing with AVAudioPlayer
but it’s horrendous code. I’m having to cast to void *
to make sure my music player class is compatible with my C++ code base. The garbage collector is so annoying. All it does is get in your way. You have to fight it with bridge casts.
I’d really like to use SDL_Mixer or a simple C library.