src/audio/arts/SDL_artsaudio.c
changeset 9393 ed79a66e57e5
parent 8149 681eb46b8ac4
child 9394 bb28e5281770
equal deleted inserted replaced
9392:92e23eff9b89 9393:ed79a66e57e5
   149            that use a different process id for each thread.
   149            that use a different process id for each thread.
   150          */
   150          */
   151         /* Check every 10 loops */
   151         /* Check every 10 loops */
   152         if (this->hidden->parent && (((++cnt) % 10) == 0)) {
   152         if (this->hidden->parent && (((++cnt) % 10) == 0)) {
   153             if (kill(this->hidden->parent, 0) < 0 && errno == ESRCH) {
   153             if (kill(this->hidden->parent, 0) < 0 && errno == ESRCH) {
   154                 this->enabled = 0;
   154                 SDL_AudioDeviceDisconnected(SDL_FALSE, this);
   155             }
   155             }
   156         }
   156         }
   157     }
   157     }
   158 
   158 
   159     /* Use timer for general audio synchronization */
   159     /* Use timer for general audio synchronization */
   177         this->hidden->next_frame += this->hidden->frame_ticks;
   177         this->hidden->next_frame += this->hidden->frame_ticks;
   178     }
   178     }
   179 
   179 
   180     /* If we couldn't write, assume fatal error for now */
   180     /* If we couldn't write, assume fatal error for now */
   181     if (written < 0) {
   181     if (written < 0) {
   182         this->enabled = 0;
   182         SDL_AudioDeviceDisconnected(SDL_FALSE, this);
   183     }
   183     }
   184 #ifdef DEBUG_AUDIO
   184 #ifdef DEBUG_AUDIO
   185     fprintf(stderr, "Wrote %d bytes of audio data\n", written);
   185     fprintf(stderr, "Wrote %d bytes of audio data\n", written);
   186 #endif
   186 #endif
   187 }
   187 }