SDL_Mixer - Mix_LoadMUS returns null by .ogg file

I get a null pointer and the message

Unrecognized music format
if I try to load another format as .wav. Am I doing anything wrong?

I initialize SDL_Mixer with

Code:

if (Mix_OpenAudio(22050, MIX_DEFAULT_FORMAT, 2, 4096) == -1) {
throw new Exception("Cannot open SDL Audio: " ~ to!(string)(Mix_GetError()));
}

I’m sure that the file that I’m trying to load exists.

Did you do this first?

if(Mix_Init(MIX_INIT_OGG) != MIX_INIT_OGG)
throw new Exception(…);

And make sure you have the ogg/vorbis dynamic libraries in your app
directory.On Mon, Jan 14, 2013 at 9:49 AM, NSpace wrote:

**
I get a null pointer and the message

Quote:

Unrecognized music format

if I try to load another format as .wav. Am I doing anything wrong?

I initialize SDL_Mixer with

Code:

if (Mix_OpenAudio(22050, MIX_DEFAULT_FORMAT, 2, 4096) == -1) {
throw new Exception("Cannot open SDL Audio: " ~
to!(string)(Mix_GetError()));
}

I’m sure that the file that I’m trying to load exists.


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


Mike Parker

Michael Parker wrote:

Did you do this first?

if(Mix_Init(MIX_INIT_OGG) != MIX_INIT_OGG)
? ? throw new Exception(…);

And make sure you have the ogg/vorbis dynamic libraries in your app directory.

  I get a null pointer and the message 


Quote:

Unrecognized music format

if I try to load another format as .wav. Am I doing anything wrong?

I initialize SDL_Mixer with

Code:

if (Mix_OpenAudio(22050, MIX_DEFAULT_FORMAT, 2, 4096) == -1) {
? ?throw new Exception("Cannot open SDL Audio: " ~ to!(string)(Mix_GetError()));?
}

I’m sure that the file that I’m trying to load exists.


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


Mike Parker

Yes I did, then I get the exception. That was the reason why I downloaded SDL_mixer again, but now I’m getting the missing ogg error.> On Mon, Jan 14, 2013 at 9:49 AM, NSpace <@NSpace (@NSpace)> wrote:

I cloned again SDL_mixer and saw that in the VisualC directory all needed files exists.
But I cannot use the project files with VS2010. What’s the problem? Should I use VS2008?