src/audio/sun/SDL_sunaudio.c
changeset 1464 af30090c0330
parent 1402 d910939febfa
child 1662 782fd950bd46
child 1895 c121d94672cb
child 4159 a1b03ba2fcd0
equal deleted inserted replaced
1463:0394f8ebc42d 1464:af30090c0330
    52 static void DSP_WaitAudio(_THIS);
    52 static void DSP_WaitAudio(_THIS);
    53 static void DSP_PlayAudio(_THIS);
    53 static void DSP_PlayAudio(_THIS);
    54 static Uint8 *DSP_GetAudioBuf(_THIS);
    54 static Uint8 *DSP_GetAudioBuf(_THIS);
    55 static void DSP_CloseAudio(_THIS);
    55 static void DSP_CloseAudio(_THIS);
    56 
    56 
       
    57 static Uint8 snd2au(int sample);
       
    58 
    57 /* Audio driver bootstrap functions */
    59 /* Audio driver bootstrap functions */
    58 
    60 
    59 static int Audio_Available(void)
    61 static int Audio_Available(void)
    60 {
    62 {
    61 	int fd;
    63 	int fd;
   155 	FD_SET(audio_fd, &fdset);
   157 	FD_SET(audio_fd, &fdset);
   156 	select(audio_fd+1, NULL, &fdset, NULL, NULL);
   158 	select(audio_fd+1, NULL, &fdset, NULL, NULL);
   157 #endif
   159 #endif
   158 }
   160 }
   159 
   161 
   160 static Uint8 snd2au(int sample);
       
   161 void DSP_PlayAudio(_THIS)
   162 void DSP_PlayAudio(_THIS)
   162 {
   163 {
   163 	/* Write the audio data */
   164 	/* Write the audio data */
   164 	if ( ulaw_only ) {
   165 	if ( ulaw_only ) {
   165 		/* Assuming that this->spec.freq >= 8000 Hz */
   166 		/* Assuming that this->spec.freq >= 8000 Hz */