Name the audio callback for documentation clarity.
authorSam Lantinga <slouken@libsdl.org>
Sun, 13 Dec 2009 06:21:22 +0000
changeset 3554cf815007e443
parent 3553 a579694613fd
child 3555 7549b986ccb1
Name the audio callback for documentation clarity.
include/SDL_audio.h
     1.1 --- a/include/SDL_audio.h	Sun Dec 13 06:19:32 2009 +0000
     1.2 +++ b/include/SDL_audio.h	Sun Dec 13 06:21:22 2009 +0000
     1.3 @@ -153,6 +153,20 @@
     1.4  /*@}*//*Audio flags*/
     1.5  
     1.6  /**
     1.7 + *  This function is called when the audio device needs more data.
     1.8 + *
     1.9 + *  \param userdata An application-specific parameter saved in
    1.10 + *                  the SDL_AudioSpec structure
    1.11 + *  \param stream A pointer to the audio data buffer.
    1.12 + *  \param len    The length of that buffer in bytes.
    1.13 + *
    1.14 + *  Once the callback returns, the buffer will no longer be valid.
    1.15 + *  Stereo samples are stored in a LRLRLR ordering.
    1.16 + */
    1.17 +typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
    1.18 +                                            int len);
    1.19 +
    1.20 +/**
    1.21   *  The calculated values in this structure are calculated by SDL_OpenAudio().
    1.22   */
    1.23  typedef struct SDL_AudioSpec
    1.24 @@ -164,16 +178,7 @@
    1.25      Uint16 samples;             /**< Audio buffer size in samples (power of 2) */
    1.26      Uint16 padding;             /**< Necessary for some compile environments */
    1.27      Uint32 size;                /**< Audio buffer size in bytes (calculated) */
    1.28 -    /**
    1.29 -     *  This function is called when the audio device needs more data.
    1.30 -     *
    1.31 -     *  \param stream A pointer to the audio data buffer.
    1.32 -     *  \param len    The length of that buffer in bytes.
    1.33 -     *
    1.34 -     *  Once the callback returns, the buffer will no longer be valid.
    1.35 -     *  Stereo samples are stored in a LRLRLR ordering.
    1.36 -     */
    1.37 -    void (SDLCALL * callback) (void *userdata, Uint8 * stream, int len);
    1.38 +    SDL_AudioCallback callback;
    1.39      void *userdata;
    1.40  } SDL_AudioSpec;
    1.41