WAVs can loop, and OGG and WAV loops can be finite

This commit is contained in:
2021-02-04 14:37:57 +01:00
parent ac5421a340
commit 55c9a0ddba
3 changed files with 31 additions and 22 deletions

View File

@@ -15,13 +15,13 @@ int main(int argc, char **argv) {
JA_Sound peiv = JA_LoadSound("menu_select.wav");
JA_PlayMusic(music, true);
bool should_exit = false;
while(!should_exit) {
while(SDL_PollEvent(&event)) {
if (event.type == SDL_QUIT) { should_exit = true; break; }
if (event.type == SDL_KEYDOWN) {
JA_PlaySound(peiv);
JA_PlaySound(peiv, 2);
if (JA_IsMusicPlaying())
JA_PauseMusic();
else