SDL and GC

lanael no at mail.never
Mon Apr 10 08:07:42 PDT 2006


> I'm using the SDL and D to make a simple 2D game.
> I'm having trouble with loading Sounds


> sound_effect = Mix_LoadWAV("seffect.wav");

I'm not sure about your problem, but don't forget that the SDL 
functions are C functions so they take zero terminated strings. I, 
personnaly, use that :

char[] aSoundFile="sound.wav";
Mix_Chunk *sample=null;
sample=Mix_LoadWAV_RW(SDL_RWFromFile(toStringz(aSoundFile), "rb"), 1);





More information about the Digitalmars-d-learn mailing list