SDL Mixer acting strangely (trying to open OGG as music)

Hello.

First of all this is the code that gives me trouble:

Code:
if (Mix_Init(MIX_INIT_OGG) == 0)
std::cout <<Mix_GetError() <<"\n";

music = Mix_LoadMUS("test.ogg");
if (!music)
    std::cout <<Mix_GetError() <<"\n";

First of all, when I run this Mix_Init fails and gives me the error “Mixer not built with FluidSynth support”, and after that it can’t load the music file with the error “Unrecognized music format”.
I have the ogg and vorbis libraries installed.
What’s even stranger is that when I try this:

Code:
if (Mix_Init(MIX_INIT_MP3) == 0)
std::cout <<Mix_GetError() <<"\n";

music = Mix_LoadMUS("test.ogg");
if (!music)
    std::cout <<Mix_GetError() <<"\n";

I get the error “Mixer not built with Ogg Vorbis support”. What is going on?

I’m using debian by the way.

Have you tried SDL_mixer from Mercurial? This bug sounds vaguely familiar
and I think we fixed it:
http://hg.libsdl.org/SDL_mixerOn Fri, Mar 7, 2014 at 11:59 AM, ShiroAisu wrote:

Hello.

First of all this is the code that gives me trouble:

Code:

 if (Mix_Init(MIX_INIT_OGG) == 0)
    std::cout <
music = Mix_LoadMUS("test.ogg");
if (!music)
    std::cout <

First of all, when I run this Mix_Init fails and gives me the error “Mixer
not built with FluidSynth support”, and after that it can’t load the music
file with the error “Unrecognized music format”.
I have the ogg and vorbis libraries installed.
What’s even stranger is that when I try this:

Code:

 if (Mix_Init(MIX_INIT_MP3) == 0)
    std::cout <
music = Mix_LoadMUS("test.ogg");
if (!music)
    std::cout <

I get the error “Mixer not built with Ogg Vorbis support”. What is going
on?

I’m using debian by the way.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Sam Lantinga wrote:

Have you tried SDL_mixer from Mercurial? This bug sounds vaguely familiar and I think we fixed it:http://hg.libsdl.org/SDL_mixer (http://hg.libsdl.org/SDL_mixer)

Quick question, how do I download a branch from mercurial? Can I do it without installing mercurial or…?

Well, I’m an idiot. Turns out I was linking my program with the SDL 1 mixer libs instead of with the SDL 2 mixer libs…

I’m sorry for the trouble. I didn’t even consider that as I tought it wasn’t possible.