getDevice method

int getDevice()

Query an audio stream for its currently-bound device.

This reports the logical audio device that an audio stream is currently bound to.

If not bound, or invalid, this returns zero, which is not a valid device ID.

\param stream the audio stream to query. \returns the bound audio device, or 0 if not bound or invalid.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.2.0.

\sa SDL_BindAudioStream \sa SDL_BindAudioStreams

extern SDL_DECLSPEC SDL_AudioDeviceID SDLCALL SDL_GetAudioStreamDevice(SDL_AudioStream *stream)

{@category audio}

Implementation

int getDevice() => sdlGetAudioStreamDevice(this);