src/audio/SDL_audio.c
changeset 2942 1e431c2631ee
parent 2939 084e5b4fc5be
child 2947 fec0db6c44b7
equal deleted inserted replaced
2941:1d2bc7259f30 2942:1e431c2631ee
   615         tried_to_init = 1;
   615         tried_to_init = 1;
   616         SDL_memset(&current_audio, 0, sizeof(current_audio));
   616         SDL_memset(&current_audio, 0, sizeof(current_audio));
   617         current_audio.name = backend->name;
   617         current_audio.name = backend->name;
   618         current_audio.desc = backend->desc;
   618         current_audio.desc = backend->desc;
   619         rc = backend->init(&current_audio.impl);
   619         rc = backend->init(&current_audio.impl);
   620         if (rc == 2) {  /* init'd, and devices available. Take it! */
   620         if (rc == 2) {          /* init'd, and devices available. Take it! */
   621             initialized = 1;
   621             initialized = 1;
   622             best_choice = i;
   622             best_choice = i;
   623         } else if (rc == 1) { /* init'd, but can't see any devices. */
   623         } else if (rc == 1) {   /* init'd, but can't see any devices. */
   624             current_audio.impl.Deinitialize();
   624             current_audio.impl.Deinitialize();
   625             if (best_choice == -1) {
   625             if (best_choice == -1) {
   626                 best_choice = i;
   626                 best_choice = i;
   627             }
   627             }
   628         }
   628         }