Sign in to follow this  

SDL_Mixer problem with OGG files.

Recommended Posts

Hello all, I'm trying to play an OGG file with SDL and SDL_mixer library. I'm actually using SDL 1.2 and SDL_mixer 1.2.8, all under Ubuntu linux OS. I downloaded source code and compiled SDL_Mixer and it used Vorbis library to compile with OGG support, all correct. The problem i have is that when i try to load any OGG file (i downloaded someone from vorbis to test too) i get the next error: Module format not recognized Part of the code is: #include "SDL.h" #include "SDL_mixer.h" // Initialize SDL library if (SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0) { fprintf(stderr, "Unable to initialize SDL: %s\n", SDL_GetError()); exit(1); } // Create audio if(Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 1024) != 0) { fprintf(stderr, "Unable to initialize audio: %s\n", Mix_GetError()); exit(1); } Mix_Music *music; music = Mix_LoadMUS("src/media/newarea.ogg"); if(music == NULL) { fprintf(stderr, "%s\n", Mix_GetError()); exit(1); } ... Thanks very much.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this