nickspoon
vultum stultum habes
Hey woogal, do you have any updates on your SDL_mixer?
jbb posted on Dec 30 2005 at 04:22 PM said:Hi guys,
Any update on how best to use SDL_mixer? (wich version, wich params...)
Mine keeps blackscreening immediately... I'm compiling on MacOSX, original version part of the pack or the version woogal posted right above.
All I'm doing is playing a mod... and then a few WAV on top with the code below... Any idea?
#include "SDL.h"
#include "SDL_mixer.h"
Mix_OpenAudio (22050, AUDIO_S16, 2, 4096);
...
Mix_PlayMusic( music , -1); //(a 4 channels mod)
...
Mix_PlayChannel(-1, soundfx, 0); //( a normal wav)
I must precise all the above works fine on Pc or Mac (or MorphOS) SDL...
Cheers!
JBB
if(Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, AUDIO_S16, MIX_DEFAULT_CHANNELS, 128) < 0) {
printf("Unable to open audio!\n");
exit(1);
}
Mix_Chunk *pong = NULL;
pong = Mix_LoadWAV("pong.wav"); // hit wall
Mix_PlayChannel(-1, pong, 0);