Commit e0e5f49b authored by Sam Lantinga's avatar Sam Lantinga

Name the audio callback for documentation clarity.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404302
parent 29aecb01
...@@ -152,6 +152,20 @@ typedef Uint16 SDL_AudioFormat; ...@@ -152,6 +152,20 @@ typedef Uint16 SDL_AudioFormat;
/*@}*//*Audio flags*/ /*@}*//*Audio flags*/
/**
* This function is called when the audio device needs more data.
*
* \param userdata An application-specific parameter saved in
* the SDL_AudioSpec structure
* \param stream A pointer to the audio data buffer.
* \param len The length of that buffer in bytes.
*
* Once the callback returns, the buffer will no longer be valid.
* Stereo samples are stored in a LRLRLR ordering.
*/
typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
int len);
/** /**
* The calculated values in this structure are calculated by SDL_OpenAudio(). * The calculated values in this structure are calculated by SDL_OpenAudio().
*/ */
...@@ -164,16 +178,7 @@ typedef struct SDL_AudioSpec ...@@ -164,16 +178,7 @@ typedef struct SDL_AudioSpec
Uint16 samples; /**< Audio buffer size in samples (power of 2) */ Uint16 samples; /**< Audio buffer size in samples (power of 2) */
Uint16 padding; /**< Necessary for some compile environments */ Uint16 padding; /**< Necessary for some compile environments */
Uint32 size; /**< Audio buffer size in bytes (calculated) */ Uint32 size; /**< Audio buffer size in bytes (calculated) */
/** SDL_AudioCallback callback;
* This function is called when the audio device needs more data.
*
* \param stream A pointer to the audio data buffer.
* \param len The length of that buffer in bytes.
*
* Once the callback returns, the buffer will no longer be valid.
* Stereo samples are stored in a LRLRLR ordering.
*/
void (SDLCALL * callback) (void *userdata, Uint8 * stream, int len);
void *userdata; void *userdata;
} SDL_AudioSpec; } SDL_AudioSpec;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment