[SDL] BUG: SDL_mixer 1.2.5 unable to load .ogg as music?
sebastian.beschke at student.uni-tuebingen.de
sebastian.beschke at student.uni-tuebingen.de
Sat Jun 3 09:28:19 PDT 2006
Hi,
I haven't been able to convince the latest version 1.2.5 of SDL_mixer to load
Ogg Vorbis files as Mix_Music objects. I've included a small sample program
that demonstrates this: The program crashes on the Mix_LoadMUS() call with an
access violation. The same code worked with the old version of the library.
I'm using Dev-C++ version 4.9.9.2, SDL version 1.2.10 and SDL_mixer version
1.2.5 on Windows XP.
--- My sample program demonstrating the error:
#include <stdio.h>
#include "SDL.h"
#include "SDL_mixer.h"
int main(int argc, char* argv[])
{
fprintf(stderr, "SDL_Init(SDL_INIT_AUDIO);\n");
SDL_Init(SDL_INIT_AUDIO);
fprintf(stderr, "Mix_OpenAudio\n");
if(Mix_OpenAudio(22050, AUDIO_S16SYS, 2, 4096)) {
fprintf(stderr, "OpenAudio failed: %s\n", Mix_GetError());
exit(1);
}
fprintf(stderr, "Mix_LoadMUS()\n");
Mix_Music* music = Mix_LoadMUS("music.ogg");
if(!music) {
fprintf(stderr, "Could not load music.ogg: %s\n", Mix_GetError());
exit(1);
}
fprintf(stderr, "Mix_FreeMusic()\n");
Mix_FreeMusic(music);
Mix_CloseAudio();
SDL_Quit();
return 0;
}
--- The contents of stderr.txt after running the program, which crashes with
an access violation:
SDL_Init(SDL_INIT_AUDIO);
Mix_OpenAudio
Mix_LoadMUS()
---
The following thread on the derelict forum is also related:
http://www.dsource.org/forums/viewtopic.php?p=9473
Is this an SDL_mixer bug or am I missing something?
Thanks for your help
Sebastian
More information about the SDL
mailing list