Use of fake_stream in SDL_RunAudio

Hi,

I’m trying to get the playback latency as low as I can for
audio playback.

I’m using Linux, and noticed that there is a delay in SDL_RunAudio while
stream gets set to audio->fake_stream, instead of getting the
buffer.

The below patch seems to work fine in my system (it tries GetAudioBuf
before the main loop); is there any reason this will not work ?

Thanks,
Bill May

Index: src/audio/SDL_audio.c===================================================================
RCS file: /vws/pan/mpeg4ip/lib/SDLAudio/src/audio/SDL_audio.c,v
retrieving revision 1.6
diff -c -w -r1.6 SDL_audio.c
*** src/audio/SDL_audio.c 13 Jan 2005 18:21:29 -0000 1.6
— src/audio/SDL_audio.c 27 Oct 2005 22:58:17 -0000


*** 168,173 ****
— 168,175 ----
silence = audio->spec.silence;
stream_len = audio->spec.size;
}

  •   stream = audio->GetAudioBuf(audio);
    
  •   if (stream == NULL)
         stream = audio->fake_stream;
    

    #ifdef ENABLE_AHI