Hello David,
yes, I have loaded more than one music track…
I had a lot of bugs when I free the music chunk… with debugger I saw that errors could be due to some kind of “interferences” between different music tracks (if I changed the music load order, I got different results or even, no errors!) but I would have to do more and more tests… thanks you, I have tried to load only one track and… like a miracle, anything works! so, sincerely, thanks you very much!
I had a music loader manager so I will extend it to only load on SDL_mixer one track at the same time, this “issue” will be completely hidden for the final programmer.
Anyway, Is this behaviour normal? I havent read anything about only load one music track at the same time… and also, I am a bit surprised because nobody has reported (as far as I know) this issue.
I will do more testing (using different compiler, read the internals of sdl_mixer when manage music tracks, etc.) to try to understand more this issue.
Any help, would be appreciated. Thanks in advance.
Cheers----- Original Message -----
From: David Olsen
To: A list for developers using the SDL library. (includesSDL-announce)
Sent: Sunday, October 02, 2005 5:56 PM
Subject: Re: [SDL] Anyone has problems with SDL_mixer & mikmod?
Roberto,
have you loaded more than one music track? I did this with one of my games, where I loaded all of the the tracks at once, and then played them when needed, then tried to free them all at the end of the program, but it was a crash-ending every time.
My solution was to only load one music track at a time, when needed, and free it before the next was loaded. In this way, I avoided a crash in freeing music tracks.
I hope this helps,
-Dave
----- Original Message -----
From: Roberto Prieto
To: sdl at libsdl.org
Sent: Saturday, October 01, 2005 1:22 PM
Subject: [SDL] Anyone has problems with SDL_mixer & mikmod?
Dear all,
I'm having a lot of problems with the playback of XM,MOD and others modules using SDL_mixer.
All of them are at end my program, I try to free the music resource and it fails on almost every free().
For example, the mloader.c of mikmod has this function:
static void ML_FreeEx(MODULE *mf)
{
UWORD t;
if(mf->songname) free(mf->songname);
if(mf->comment) free(mf->comment);
if(mf->modtype) free->modtype
....
well, the last line (free->modtype) fails ALWAYS that I try to free a module...
I know the MikMod code of sdl_mixer is very old version...
Anyone has the same problems?
Roberto Prieto
megastorm at mi.madritel.es
http://www.megastormsystems.com
_______________________________________________
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl