sdlCloseAudioDevice function

void sdlCloseAudioDevice(
  1. int dev
)

Use this function to shut down audio processing and close the audio device.

The application should close open audio devices once they are no longer needed. Calling this function will wait until the device's audio callback is not running, release the audio hardware and then clean up internal state. No further audio will play from this device once this function returns.

This function may block briefly while pending audio data is played by the hardware, so that applications don't drop the last buffer of data they supplied.

The device ID is invalid as soon as the device is closed, and is eligible for reuse in a new SDL_OpenAudioDevice() call immediately.

\param dev an audio device previously opened with SDL_OpenAudioDevice()

\since This function is available since SDL 2.0.0.

\sa SDL_OpenAudioDevice

extern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID dev)

Implementation

void sdlCloseAudioDevice(int dev) {
  final sdlCloseAudioDeviceLookupFunction =
      libSdl2.lookupFunction<Void Function(Uint32 dev), void Function(int dev)>(
          'SDL_CloseAudioDevice');
  return sdlCloseAudioDeviceLookupFunction(dev);
}