src/audio/arts/SDL_artsaudio.c
changeset 9394 bb28e5281770
parent 9393 ed79a66e57e5
child 9619 b94b6d0bff0f
equal deleted inserted replaced
9393:ed79a66e57e5 9394:bb28e5281770
   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                 SDL_AudioDeviceDisconnected(SDL_FALSE, this);
   154                 SDL_OpenedAudioDeviceDisconnected(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         SDL_AudioDeviceDisconnected(SDL_FALSE, this);
   182         SDL_OpenedAudioDeviceDisconnected(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 }
   227     }
   227     }
   228     return SDL_NAME(arts_suspended)();
   228     return SDL_NAME(arts_suspended)();
   229 }
   229 }
   230 
   230 
   231 static int
   231 static int
   232 ARTS_OpenDevice(_THIS, const char *devname, int iscapture)
   232 ARTS_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
   233 {
   233 {
   234     int rc = 0;
   234     int rc = 0;
   235     int bits = 0, frag_spec = 0;
   235     int bits = 0, frag_spec = 0;
   236     SDL_AudioFormat test_format = 0, format = 0;
   236     SDL_AudioFormat test_format = 0, format = 0;
   237 
   237