Name the audio callback for documentation clarity.
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404302
This commit is contained in:
parent
29aecb01bf
commit
e0e5f49b6a
1 changed files with 15 additions and 10 deletions
|
@ -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
|
||||||
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;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue