src/audio/paudio/SDL_paudio.c
branchgsoc2008_nds
changeset 2669 e27bdcc80744
parent 2060 866052b01ee5
child 2859 99210400e8b9
equal deleted inserted replaced
2668:bb3241de289e 2669:e27bdcc80744
   206     do {
   206     do {
   207         written = write(this->hidden->audio_fd, mixbuf, mixlen);
   207         written = write(this->hidden->audio_fd, mixbuf, mixlen);
   208         if ((written < 0) && ((errno == 0) || (errno == EAGAIN))) {
   208         if ((written < 0) && ((errno == 0) || (errno == EAGAIN))) {
   209             SDL_Delay(1);       /* Let a little CPU time go by */
   209             SDL_Delay(1);       /* Let a little CPU time go by */
   210         }
   210         }
   211     }
   211     } while ((written < 0) &&
   212     while ((written < 0) &&
   212              ((errno == 0) || (errno == EAGAIN) || (errno == EINTR)));
   213            ((errno == 0) || (errno == EAGAIN) || (errno == EINTR)));
       
   214 
   213 
   215     /* If timer synchronization is enabled, set the next write frame */
   214     /* If timer synchronization is enabled, set the next write frame */
   216     if (this->hidden->frame_ticks) {
   215     if (this->hidden->frame_ticks) {
   217         this->hidden->next_frame += this->hidden->frame_ticks;
   216         this->hidden->next_frame += this->hidden->frame_ticks;
   218     }
   217     }