OGGs preloading, deleting...
This commit is contained in:
6
main.cpp
6
main.cpp
@@ -11,9 +11,11 @@ int main(int argc, char **argv) {
|
||||
sdlWindow = SDL_CreateWindow("JailAudio", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 320, 240, SDL_WINDOW_SHOWN);
|
||||
JA_Init(48000, AUDIO_S16, 2);
|
||||
|
||||
JA_PlayMusic("intro2.ogg");
|
||||
JA_Music music = JA_LoadMusic("intro2.ogg");
|
||||
JA_Sound peiv = JA_LoadSound("menu_select.wav");
|
||||
|
||||
JA_PlayMusic(music, true);
|
||||
|
||||
bool should_exit = false;
|
||||
while(!should_exit) {
|
||||
while(SDL_PollEvent(&event)) {
|
||||
@@ -30,6 +32,8 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
}
|
||||
JA_DeleteSound(peiv);
|
||||
JA_DeleteMusic(music);
|
||||
SDL_DestroyWindow(sdlWindow);
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user