[SDL] SDL_Mixer help

Steven Bradley grellin-igp at hotmail.com
Wed Oct 4 15:56:20 PDT 2006


I have a small game I've been working on and when I load and play the music, 
a midi file, only the left speaker plays. I also have sound fx going and it 
is working fine in both speakers. I haven't set any panning for the music 
and have used exactly what it in the mixer doc examples. Any ideas what it 
could be or anyone know of a similar problem?

Mix_AllocateChannels(32);
Mix_Volume(-1,MIX_MAX_VOLUME/2);
tempsound = Mix_LoadWAV_RW(SDL_RWFromFile("data\\temp.wav", "rb"), 1);
if(!tempsound)
{
	printf("Mix_LoadWAV_RW: %s\n", Mix_GetError());
}

music = Mix_LoadMUS("data\\1.mid");
if(!music)
{
	printf("cant load: %s\n", Mix_GetError());
                // this might be a critical error...
}

and

if(Mix_PlayMusic(music, -1)==-1)
{
	// printf("Mix_PlayMusic: %s\n", Mix_GetError());
	// well, there's no music, but most games don't break without music...
}

_________________________________________________________________
Get today's hot entertainment gossip  http://movies.msn.com/movies/hotgossip





More information about the SDL mailing list