WAVs can loop, and OGG and WAV loops can be finite
This commit is contained in:
4
main.cpp
4
main.cpp
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user