#include #include #include #include #include extern IDirectSound* directsound; Sound* SoundCreate(char* filename) { Sound* sound = NEW(Sound); assert(sound); sound->wave = SndObjCreate(directsound, filename, 1); assert(sound->wave); return sound; } void SoundDelete(Sound* sound) { assert(sound); free(sound); } void SoundPlay(Sound* sound, int mode) { assert(sound); SndObjPlay(sound->wave, mode); } void SoundStop(Sound* sound) { assert(sound); SndObjStop(sound->wave); }