.\" 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_CreateAndBindAudioStream: .\" https://wiki.libsdl.org/SDL_CreateAndBindAudioStream .\" 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_CreateAndBindAudioStream .\" SDL can be found at https://libsdl.org/ .de URL \$2 \(laURL: \$1 \(ra\$3 .. .if \n[.g] .mso www.tmac .TH SDL_CreateAndBindAudioStream 3 "SDL 3.0.0" "SDL" "SDL3 FUNCTIONS" .SH NAME SDL_CreateAndBindAudioStream \- Convenience function to create and bind an audio stream in one step\[char46] .SH SYNOPSIS .nf .B #include \(dqSDL3/SDL.h\(dq .PP .BI "SDL_AudioStream* SDL_CreateAndBindAudioStream(SDL_AudioDeviceID devid, const SDL_AudioSpec *spec); .fi .SH DESCRIPTION This manages the creation of an audio stream, and setting its format correctly to match both the app and the audio device's needs\[char46] This is optional, but slightly less cumbersome to set up for a common use case\[char46] The .BR spec parameter represents the app's side of the audio stream\[char46] That is, for recording audio, this will be the output format, and for playing audio, this will be the input format\[char46] This function will set the other side of the audio stream to the device's format\[char46] .SH FUNCTION PARAMETERS .TP .I devid an audio device to bind a stream to\[char46] This must be an opened device, and can not be zero\[char46] .TP .I spec the audio stream's input format .SH RETURN VALUE Returns a bound audio stream on success, ready to use\[char46] NULL on error; call .BR SDL_GetError () for more information\[char46] .SH THREAD SAFETY It is safe to call this function from any thread\[char46] .SH AVAILABILITY This function is available since SDL 3\[char46]0\[char46]0\[char46] .SH SEE ALSO .BR SDL_BindAudioStreams (3), .BR SDL_UnbindAudioStreams (3), .BR SDL_UnbindAudioStream (3)