Sync SDL3 wiki -> header

This commit is contained in:
SDL Wiki Bot
2023-08-27 20:55:12 +00:00
parent 58c859f64d
commit 5bdad5210f
+15 -14
View File
@@ -1033,19 +1033,19 @@ extern DECLSPEC void SDLCALL SDL_DestroyAudioStream(SDL_AudioStream *stream);
/** /**
* Convenience function for straightforward audio init for the common case. * Convenience function for straightforward audio init for the common case.
* *
* If all your app intends to do is provide a single source of PCM audio, * If all your app intends to do is provide a single source of PCM audio, this
* this function allows you to do all your audio setup in a single call. * function allows you to do all your audio setup in a single call.
* *
* This is intended to be a clean means to migrate apps from SDL2. * This is intended to be a clean means to migrate apps from SDL2.
* *
* This function will open an audio device, create a stream and bind it. * This function will open an audio device, create a stream and bind it.
* Unlike other methods of setup, the audio device will be closed when this * Unlike other methods of setup, the audio device will be closed when this
* stream is destroyed, so the app can treat the returned SDL_AudioStream * stream is destroyed, so the app can treat the returned SDL_AudioStream as
* as the only object needed to manage audio playback. * the only object needed to manage audio playback.
* *
* Also unlike other functions, the audio device begins paused. This is * Also unlike other functions, the audio device begins paused. This is to map
* to map more closely to SDL2-style behavior, and since there is no extra * more closely to SDL2-style behavior, and since there is no extra step here
* step here to bind a stream to begin audio flowing. * to bind a stream to begin audio flowing.
* *
* This function works with both playback and capture devices. * This function works with both playback and capture devices.
* *
@@ -1062,18 +1062,19 @@ extern DECLSPEC void SDLCALL SDL_DestroyAudioStream(SDL_AudioStream *stream);
* capturing). Otherwise, the callback will begin to fire once the device is * capturing). Otherwise, the callback will begin to fire once the device is
* unpaused. * unpaused.
* *
* \param devid an audio device to open, or SDL_AUDIO_DEVICE_DEFAULT_OUTPUT * \param devid an audio device to open, or SDL_AUDIO_DEVICE_DEFAULT_OUTPUT or
* or SDL_AUDIO_DEVICE_DEFAULT_CAPTURE. * SDL_AUDIO_DEVICE_DEFAULT_CAPTURE.
* \param spec the audio stream's data format. Required. * \param spec the audio stream's data format. Required.
* \param callback A callback where the app will provide new data for playback, * \param callback A callback where the app will provide new data for
* or receive new data for capture. Can be NULL, in which case * playback, or receive new data for capture. Can be NULL, in
* the app will need to call SDL_PutAudioStreamData or * which case the app will need to call SDL_PutAudioStreamData
* SDL_GetAudioStreamData as necessary. * or SDL_GetAudioStreamData as necessary.
* \param userdata App-controlled pointer passed to callback. Can be NULL. * \param userdata App-controlled pointer passed to callback. Can be NULL.
* Ignored if callback is NULL. * Ignored if callback is NULL.
* \returns an audio stream on success, ready to use. NULL on error; call * \returns an audio stream on success, ready to use. NULL on error; call
* SDL_GetError() for more information. When done with this stream, * SDL_GetError() for more information. When done with this stream,
* call SDL_DestroyAudioStream to free resources and close the device. * call SDL_DestroyAudioStream to free resources and close the
* device.
* *
* \threadsafety It is safe to call this function from any thread. * \threadsafety It is safe to call this function from any thread.
* *