test/testmultiaudio.c
changeset 9290 fe975b2313fa
parent 9278 8900afb78a19
child 9619 b94b6d0bff0f
     1.1 --- a/test/testmultiaudio.c	Wed Dec 24 22:22:35 2014 -0500
     1.2 +++ b/test/testmultiaudio.c	Thu Dec 25 21:42:56 2014 +0100
     1.3 @@ -54,7 +54,9 @@
     1.4  loop()
     1.5  {
     1.6      if(cbd[0].done) {
     1.7 +#ifdef __EMSCRIPTEN__
     1.8          emscripten_cancel_main_loop();
     1.9 +#endif
    1.10          SDL_PauseAudioDevice(cbd[0].dev, 1);
    1.11          SDL_CloseAudioDevice(cbd[0].dev);
    1.12          SDL_FreeWAV(sound);
    1.13 @@ -145,6 +147,17 @@
    1.14  
    1.15          SDL_Delay(100);
    1.16      }
    1.17 +
    1.18 +#ifndef __EMSCRIPTEN__
    1.19 +    for (i = 0; i < devcount; i++) {
    1.20 +        if (cbd[i].dev) {
    1.21 +            SDL_PauseAudioDevice(cbd[i].dev, 1);
    1.22 +            SDL_CloseAudioDevice(cbd[i].dev);
    1.23 +        }
    1.24 +    }
    1.25 +
    1.26 +    SDL_Log("All done!\n");
    1.27 +#endif
    1.28  }
    1.29  
    1.30