src/audio/ums/SDL_umsaudio.c
branchgsoc2008_nds
changeset 2669 e27bdcc80744
parent 2049 5f6550e5184f
child 2859 99210400e8b9
equal deleted inserted replaced
2668:bb3241de289e 2669:e27bdcc80744
   216 #ifdef DEBUG_AUDIO
   216 #ifdef DEBUG_AUDIO
   217             fprintf(stderr, "Returning from PlayAudio with devices error\n");
   217             fprintf(stderr, "Returning from PlayAudio with devices error\n");
   218 #endif
   218 #endif
   219             return;
   219             return;
   220         }
   220         }
   221     }
   221     } while (samplesToWrite > 0);
   222     while (samplesToWrite > 0);
       
   223 
   222 
   224     SDL_LockAudio();
   223     SDL_LockAudio();
   225     SDL_memcpy(&swpbuf, &this->hidden->playbuf, sizeof(UMSAudioTypes_Buffer));
   224     SDL_memcpy(&swpbuf, &this->hidden->playbuf, sizeof(UMSAudioTypes_Buffer));
   226     SDL_memcpy(&this->hidden->playbuf, &this->hidden->fillbuf,
   225     SDL_memcpy(&this->hidden->playbuf, &this->hidden->fillbuf,
   227                sizeof(UMSAudioTypes_Buffer));
   226                sizeof(UMSAudioTypes_Buffer));
   324             break;
   323             break;
   325         }
   324         }
   326         if (!success) {
   325         if (!success) {
   327             test_format = SDL_NextAudioFormat();
   326             test_format = SDL_NextAudioFormat();
   328         }
   327         }
   329     }
   328     } while (!success && test_format);
   330     while (!success && test_format);
       
   331 
   329 
   332     if (success == 0) {
   330     if (success == 0) {
   333         SDL_SetError("Couldn't find any hardware audio formats");
   331         SDL_SetError("Couldn't find any hardware audio formats");
   334         return -1;
   332         return -1;
   335     }
   333     }