Trenki
Member
Hi!
I have a problem with SDL_Mixer! The first problem is on Windows with the current 1.2.7 release of SDL_mixer. If I try to load an ogg file in the following program it causes an access violation in the line Mix_LoadMUS! Others seem to have the same problem but I couldn't find a solution googling.
The other problem I have is on the GP2X. After wrestling with a lot of undefined references I managed to compile it changing the order in which the libraries are specified in the command line. Now the following program compiles but with this warning:
c:/devkitGP2X/lib\libmikmod.a(mdriver.o): In function `MD_DropPrivileges':
../playercode/mdriver.c:919: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
In the end when I run it with an ogg or a wav file it seems to load it since the line "failed to load music" is not print to the telnet console but it also does not play any sound and the application also doesn't quit.
When trying to quit the program using Ctrl-C it does not react for a while and eventually aborts execution with the message:
Fatal signal: Segmentation Fault (SDL Parachute Deployed)
*** glibc detected *** double free or corruption (!prev): 0x002330b0 ***
Aborted
So here is the test program I used and compiled with devkitGP2X. If anyone has a solution to the windows and GP2X problem please tell me.
CODE
#include "SDL.h"
#include "SDL_mixer.h"
int main(int ac, char *av[])
{
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO);
SDL_SetVideoMode(320, 240, 16, SDL_HWSURFACE);
Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT,
MIX_DEFAULT_CHANNELS, 4096*4);
Mix_Music *m = Mix_LoadMUS("LoopyMusic.wav");
if (m){
Mix_PlayMusic(m, 1);
while (Mix_PlayingMusic());
} else {
printf("failed loading music!");
}
Mix_FreeMusic(m);
Mix_CloseAudio();
SDL_Quit();
}
I have a problem with SDL_Mixer! The first problem is on Windows with the current 1.2.7 release of SDL_mixer. If I try to load an ogg file in the following program it causes an access violation in the line Mix_LoadMUS! Others seem to have the same problem but I couldn't find a solution googling.
The other problem I have is on the GP2X. After wrestling with a lot of undefined references I managed to compile it changing the order in which the libraries are specified in the command line. Now the following program compiles but with this warning:
c:/devkitGP2X/lib\libmikmod.a(mdriver.o): In function `MD_DropPrivileges':
../playercode/mdriver.c:919: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
In the end when I run it with an ogg or a wav file it seems to load it since the line "failed to load music" is not print to the telnet console but it also does not play any sound and the application also doesn't quit.
When trying to quit the program using Ctrl-C it does not react for a while and eventually aborts execution with the message:
Fatal signal: Segmentation Fault (SDL Parachute Deployed)
*** glibc detected *** double free or corruption (!prev): 0x002330b0 ***
Aborted
So here is the test program I used and compiled with devkitGP2X. If anyone has a solution to the windows and GP2X problem please tell me.
CODE
#include "SDL.h"
#include "SDL_mixer.h"
int main(int ac, char *av[])
{
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO);
SDL_SetVideoMode(320, 240, 16, SDL_HWSURFACE);
Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT,
MIX_DEFAULT_CHANNELS, 4096*4);
Mix_Music *m = Mix_LoadMUS("LoopyMusic.wav");
if (m){
Mix_PlayMusic(m, 1);
while (Mix_PlayingMusic());
} else {
printf("failed loading music!");
}
Mix_FreeMusic(m);
Mix_CloseAudio();
SDL_Quit();
}