src/audio/esd/SDL_esdaudio.c
branchgsoc2008_nds
changeset 2669 e27bdcc80744
parent 2060 866052b01ee5
child 2859 99210400e8b9
equal deleted inserted replaced
2668:bb3241de289e 2669:e27bdcc80744
   152         written = write(this->hidden->audio_fd,
   152         written = write(this->hidden->audio_fd,
   153                         this->hidden->mixbuf, this->hidden->mixlen);
   153                         this->hidden->mixbuf, this->hidden->mixlen);
   154         if ((written < 0) && ((errno == 0) || (errno == EAGAIN))) {
   154         if ((written < 0) && ((errno == 0) || (errno == EAGAIN))) {
   155             SDL_Delay(1);       /* Let a little CPU time go by */
   155             SDL_Delay(1);       /* Let a little CPU time go by */
   156         }
   156         }
   157     }
   157     } while ((written < 0) &&
   158     while ((written < 0) &&
   158              ((errno == 0) || (errno == EAGAIN) || (errno == EINTR)));
   159            ((errno == 0) || (errno == EAGAIN) || (errno == EINTR)));
       
   160 
   159 
   161     /* Set the next write frame */
   160     /* Set the next write frame */
   162     this->hidden->next_frame += this->hidden->frame_ticks;
   161     this->hidden->next_frame += this->hidden->frame_ticks;
   163 
   162 
   164     /* If we couldn't write, assume fatal error for now */
   163     /* If we couldn't write, assume fatal error for now */