[−][src]Function sdl2_sys::SDL_GetQueuedAudioSize
pub unsafe extern "C" fn SDL_GetQueuedAudioSize(
dev: SDL_AudioDeviceID
) -> Uint32
Get the number of bytes of still-queued audio.
For playback device:
This is the number of bytes that have been queued for playback with SDL_QueueAudio(), but have not yet been sent to the hardware. This number may shrink at any time, so this only informs of pending data.
Once we've sent it to the hardware, this function can not decide the exact byte boundary of what has been played. It's possible that we just gave the hardware several kilobytes right before you called this function, but it hasn't played any of it yet, or maybe half of it, etc.
For capture devices:
This is the number of bytes that have been captured by the device and are waiting for you to dequeue. This number may grow at any time, so this only informs of the lower-bound of available data.
You may not queue audio on a device that is using an application-supplied callback; calling this function on such a device always returns 0. You have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use the audio callback, but not both.
You should not call SDL_LockAudio() on the device before querying; SDL handles locking internally for this function.
\param dev The device ID of which we will query queued audio size. \return Number of bytes (not samples!) of queued audio.
\sa SDL_QueueAudio \sa SDL_ClearQueuedAudio