@@ -2035,85 +2035,6 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyAudioStream(SDL_AudioStream *stream)
2035
2035
*/
2036
2036
extern SDL_DECLSPEC SDL_AudioStream * SDLCALL SDL_OpenAudioDeviceStream (SDL_AudioDeviceID devid , const SDL_AudioSpec * spec , SDL_AudioStreamCallback callback , void * userdata );
2037
2037
2038
- /**
2039
- * A callback that fires around an audio device's processing work.
2040
- *
2041
- * This callback fires when a logical audio device is about to start accessing
2042
- * its bound audio streams, and fires again when it has finished accessing
2043
- * them. It covers the range of one "iteration" of the audio device.
2044
- *
2045
- * It can be useful to use this callback to update state that must apply to
2046
- * all bound audio streams atomically: to make sure state changes don't happen
2047
- * while half of the streams are already processed for the latest audio
2048
- * buffer.
2049
- *
2050
- * This callback should run as quickly as possible and not block for any
2051
- * significant time, as this callback delays submission of data to the audio
2052
- * device, which can cause audio playback problems. This callback delays all
2053
- * audio processing across a single physical audio device: all its logical
2054
- * devices and all bound audio streams. Use it carefully.
2055
- *
2056
- * \param userdata a pointer provided by the app through
2057
- * SDL_SetAudioPostmixCallback, for its own use.
2058
- * \param devid the audio device this callback is running for.
2059
- * \param start true if this is the start of the iteration, false if the end.
2060
- *
2061
- * \threadsafety This will run from a background thread owned by SDL. The
2062
- * application is responsible for locking resources the callback
2063
- * touches that need to be protected.
2064
- *
2065
- * \since This datatype is available since SDL 3.4.0.
2066
- *
2067
- * \sa SDL_SetAudioIterationCallbacks
2068
- */
2069
- typedef void (SDLCALL * SDL_AudioIterationCallback )(void * userdata , SDL_AudioDeviceID devid , bool start );
2070
-
2071
- /**
2072
- * Set callbacks that fire around a new iteration of audio device processing.
2073
- *
2074
- * Two callbacks are provided here: one that runs when a device is about to
2075
- * process its bound audio streams, and another that runs when the device has
2076
- * finished processing them.
2077
- *
2078
- * These callbacks can run at any time, and from any thread; if you need to
2079
- * serialize access to your app's data, you should provide and use a mutex or
2080
- * other synchronization device.
2081
- *
2082
- * Generally these callbacks are used to apply state that applies to multiple
2083
- * bound audio streams, with a guarantee that the audio device's thread isn't
2084
- * halfway through processing them. Generally a finer-grained lock through
2085
- * SDL_LockAudioStream() is more appropriate.
2086
- *
2087
- * The callbacks are extremely time-sensitive; the callback should do the
2088
- * least amount of work possible and return as quickly as it can. The longer
2089
- * the callback runs, the higher the risk of audio dropouts or other problems.
2090
- *
2091
- * This function will block until the audio device is in between iterations,
2092
- * so any existing callback that might be running will finish before this
2093
- * function sets the new callback and returns.
2094
- *
2095
- * Physical devices do not accept these callbacks, only logical devices
2096
- * created through SDL_OpenAudioDevice() can be.
2097
- *
2098
- * Setting a NULL callback function disables any previously-set callback.
2099
- * Either callback may be NULL, and the same callback is permitted to be used
2100
- * for both.
2101
- *
2102
- * \param devid the ID of an opened audio device.
2103
- * \param start a callback function to be called at the start of an iteration.
2104
- * Can be NULL.
2105
- * \param end a callback function to be called at the end of an iteration. Can
2106
- * be NULL.
2107
- * \param userdata app-controlled pointer passed to callback. Can be NULL.
2108
- * \returns true on success or false on failure; call SDL_GetError() for more
2109
- * information.
2110
- *
2111
- * \threadsafety It is safe to call this function from any thread.
2112
- *
2113
- * \since This function is available since SDL 3.4.0.
2114
- */
2115
- extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioIterationCallbacks (SDL_AudioDeviceID devid , SDL_AudioIterationCallback start , SDL_AudioIterationCallback end , void * userdata );
2116
-
2117
2038
/**
2118
2039
* A callback that fires when data is about to be fed to an audio device.
2119
2040
*
0 commit comments