Added comments in example program.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Wed, 10 Dec 2014 21:10:55 +0100
changeset 9269d51f84c20b10
parent 9268 7f2833a2191b
child 9270 4b93f61e564d
Added comments in example program.
test/testmultiaudio.c
     1.1 --- a/test/testmultiaudio.c	Tue Dec 09 22:49:16 2014 +0100
     1.2 +++ b/test/testmultiaudio.c	Wed Dec 10 21:10:55 2014 +0100
     1.3 @@ -54,6 +54,7 @@
     1.4  #ifdef __ANDROID__  
     1.5      SDL_Event event;
     1.6    
     1.7 +    /* Create a Window to get fully initialized event processing for testing pause on Android. */
     1.8      SDL_CreateWindow("testmultiaudio", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 320, 240, 0);
     1.9  #endif
    1.10  
    1.11 @@ -79,6 +80,7 @@
    1.12              SDL_PauseAudioDevice(cbd[0].dev, 0);
    1.13              while (!cbd[0].done) {
    1.14  #ifdef __ANDROID__                
    1.15 +                /* Empty queue, some application events would prevent pause. */
    1.16                  while (SDL_PollEvent(&event)){}
    1.17  #endif                
    1.18                  SDL_Delay(100);
    1.19 @@ -115,6 +117,7 @@
    1.20              }
    1.21          }
    1.22  #ifdef __ANDROID__        
    1.23 +        /* Empty queue, some application events would prevent pause. */
    1.24          while (SDL_PollEvent(&event)){}
    1.25  #endif        
    1.26          SDL_Delay(100);