Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- first open the audio device
- if(Mix_OpenAudio(44100, AUDIO_S16, 2, 2048)){
- printf("Mix_OpenAudio: %s\n", Mix_GetError());
- exit(-1);
- };
- //below in the load_sound macro , y will be of type Mix_Chunk*
- #define load_sound(x,y) y = Mix_LoadWAV(x); \
- if(!y) exit(-1);
- #define play_sound(x) Mix_PlayChannel(1, some_Mix_Chunk_pointer_goes_here , 0);
Add Comment
Please, Sign In to add comment