.\" This manpage content is licensed under Creative Commons .\" Attribution 4.0 International (CC BY 4.0) .\" https://creativecommons.org/licenses/by/4.0/ .\" This manpage was generated from SDL's wiki page for SDL_ClearQueuedAudio: .\" https://wiki.libsdl.org/SDL_ClearQueuedAudio .\" Generated with SDL/build-scripts/wikiheaders.pl .\" Please report issues in this manpage's content at: .\" https://github.com/libsdl-org/sdlwiki/issues/new .\" Please report issues in the generation of this manpage from the wiki at: .\" https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20SDL_ClearQueuedAudio .\" SDL can be found at https://libsdl.org/ .de URL \$2 \(laURL: \$1 \(ra\$3 .. .if \n[.g] .mso www.tmac .TH SDL_ClearQueuedAudio 3 "SDL 3.0.0" "SDL" "SDL3 FUNCTIONS" .SH NAME SDL_ClearQueuedAudio \- Drop any queued audio data waiting to be sent to the hardware\[char46] .SH SYNOPSIS .nf .B #include \(dqSDL3/SDL.h\(dq .PP .BI "int SDL_ClearQueuedAudio(SDL_AudioDeviceID dev); .fi .SH DESCRIPTION Immediately after this call, .BR SDL_GetQueuedAudioSize () will return 0\[char46] For output devices, the hardware will start playing silence if more audio isn't queued\[char46] For capture devices, the hardware will start filling the empty queue with new data if the capture device isn't paused\[char46] This will not prevent playback of queued audio that's already been sent to the hardware, as we can not undo that, so expect there to be some fraction of a second of audio that might still be heard\[char46] This can be useful if you want to, say, drop any pending music or any unprocessed microphone input during a level change in your game\[char46] You may not queue or dequeue audio on a device that is using an application-supplied callback; calling this function on such a device always returns 0\[char46] You have to use the audio callback or queue audio, but not both\[char46] You should not call .BR SDL_LockAudio () on the device before clearing the queue; SDL handles locking internally for this function\[char46] This function always succeeds and thus returns void\[char46] .SH FUNCTION PARAMETERS .TP .I dev the device ID of which to clear the audio queue .SH RETURN VALUE Returns 0 on success or a negative error code on failure; call .BR SDL_GetError () for more information\[char46] .SH AVAILABILITY This function is available since SDL 3\[char46]0\[char46]0\[char46] .SH SEE ALSO .BR SDL_GetQueuedAudioSize (3), .BR SDL_QueueAudio (3), .BR SDL_DequeueAudio (3)