4 SDL_CloseAudioDevice(deviceId);
5 SDL_FreeWAV(wavBuffer);
9 void Audio::load(
const char* filename) {
10 SDL_LoadWAV(filename, &wavSpec, &wavBuffer, &wavLength);
11 deviceId = SDL_OpenAudioDevice(NULL, 0, &wavSpec, NULL, 0);
15 SDL_QueueAudio(deviceId, wavBuffer, wavLength);
16 SDL_PauseAudioDevice(deviceId, 0);