@@ -781,7 +781,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_IsAudioDevicePlayback(SDL_AudioDeviceID dev
781781 * Physical devices can not be paused or unpaused, only logical devices
782782 * created through SDL_OpenAudioDevice() can be.
783783 *
784- * \param dev a device opened by SDL_OpenAudioDevice().
784+ * \param devid a device opened by SDL_OpenAudioDevice().
785785 * \returns true on success or false on failure; call SDL_GetError() for more
786786 * information.
787787 *
@@ -792,7 +792,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_IsAudioDevicePlayback(SDL_AudioDeviceID dev
792792 * \sa SDL_ResumeAudioDevice
793793 * \sa SDL_AudioDevicePaused
794794 */
795- extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioDevice (SDL_AudioDeviceID dev );
795+ extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioDevice (SDL_AudioDeviceID devid );
796796
797797/**
798798 * Use this function to unpause audio playback on a specified device.
@@ -809,7 +809,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev);
809809 * Physical devices can not be paused or unpaused, only logical devices
810810 * created through SDL_OpenAudioDevice() can be.
811811 *
812- * \param dev a device opened by SDL_OpenAudioDevice().
812+ * \param devid a device opened by SDL_OpenAudioDevice().
813813 * \returns true on success or false on failure; call SDL_GetError() for more
814814 * information.
815815 *
@@ -820,7 +820,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev);
820820 * \sa SDL_AudioDevicePaused
821821 * \sa SDL_PauseAudioDevice
822822 */
823- extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioDevice (SDL_AudioDeviceID dev );
823+ extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioDevice (SDL_AudioDeviceID devid );
824824
825825/**
826826 * Use this function to query if an audio device is paused.
@@ -832,7 +832,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioDevice(SDL_AudioDeviceID dev);
832832 * created through SDL_OpenAudioDevice() can be. Physical and invalid device
833833 * IDs will report themselves as unpaused here.
834834 *
835- * \param dev a device opened by SDL_OpenAudioDevice().
835+ * \param devid a device opened by SDL_OpenAudioDevice().
836836 * \returns true if device is valid and paused, false otherwise.
837837 *
838838 * \threadsafety It is safe to call this function from any thread.
@@ -842,7 +842,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioDevice(SDL_AudioDeviceID dev);
842842 * \sa SDL_PauseAudioDevice
843843 * \sa SDL_ResumeAudioDevice
844844 */
845- extern SDL_DECLSPEC bool SDLCALL SDL_AudioDevicePaused (SDL_AudioDeviceID dev );
845+ extern SDL_DECLSPEC bool SDLCALL SDL_AudioDevicePaused (SDL_AudioDeviceID devid );
846846
847847/**
848848 * Get the gain of an audio device.
@@ -942,7 +942,10 @@ extern SDL_DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID devid);
942942 * Binding a stream to a device will set its output format for playback
943943 * devices, and its input format for recording devices, so they match the
944944 * device's settings. The caller is welcome to change the other end of the
945- * stream's format at any time with SDL_SetAudioStreamFormat().
945+ * stream's format at any time with SDL_SetAudioStreamFormat(). If the other
946+ * end of the stream's format has never been set (the audio stream was created
947+ * with a NULL audio spec), this function will set it to match the device
948+ * end's format.
946949 *
947950 * \param devid an audio device to bind a stream to.
948951 * \param streams an array of audio streams to bind.
@@ -1021,7 +1024,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnbindAudioStream(SDL_AudioStream *stream);
10211024/**
10221025 * Query an audio stream for its currently-bound device.
10231026 *
1024- * This reports the audio device that an audio stream is currently bound to.
1027+ * This reports the logical audio device that an audio stream is currently bound to.
10251028 *
10261029 * If not bound, or invalid, this returns zero, which is not a valid device
10271030 * ID.
@@ -1583,6 +1586,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioStreamDevice(SDL_AudioStream *str
15831586 * previously been paused. Once unpaused, any bound audio streams will begin
15841587 * to progress again, and audio can be generated.
15851588 *
1589+ * Remember, SDL_OpenAudioDeviceStream opens device in a paused state, so this
1590+ * function call is required for audio playback to begin on such device.
1591+ *
15861592 * \param stream the audio stream associated with the audio device to resume.
15871593 * \returns true on success or false on failure; call SDL_GetError() for more
15881594 * information.
@@ -1714,7 +1720,7 @@ typedef void (SDLCALL *SDL_AudioStreamCallback)(void *userdata, SDL_AudioStream
17141720 * audio to the stream during this call; if needed, the request that triggered
17151721 * this callback will obtain the new data immediately.
17161722 *
1717- * The callback's `approx_request ` argument is roughly how many bytes of
1723+ * The callback's `additional_amount ` argument is roughly how many bytes of
17181724 * _unconverted_ data (in the stream's input format) is needed by the caller,
17191725 * although this may overestimate a little for safety. This takes into account
17201726 * how much is already in the stream and only asks for any extra necessary to
@@ -1759,13 +1765,13 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamGetCallback(SDL_AudioStream *
17591765 * The callback can (optionally) call SDL_GetAudioStreamData() to obtain audio
17601766 * from the stream during this call.
17611767 *
1762- * The callback's `approx_request ` argument is how many bytes of _converted_
1763- * data (in the stream's output format) was provided by the caller, although
1764- * this may underestimate a little for safety. This value might be less than
1765- * what is currently available in the stream, if data was already there, and
1766- * might be less than the caller provided if the stream needs to keep a buffer
1767- * to aid in resampling. Which means the callback may be provided with zero
1768- * bytes, and a different amount on each call.
1768+ * The callback's `additional_amount ` argument is how many bytes of
1769+ * _converted_ data (in the stream's output format) was provided by the
1770+ * caller, although this may underestimate a little for safety. This value
1771+ * might be less than what is currently available in the stream, if data was
1772+ * already there, and might be less than the caller provided if the stream
1773+ * needs to keep a buffer to aid in resampling. Which means the callback may
1774+ * be provided with zero bytes, and a different amount on each call.
17691775 *
17701776 * The callback may call SDL_GetAudioStreamAvailable to see the total amount
17711777 * currently available to read from the stream, instead of the total provided
0 commit comments