sdl3/generated/lib_sdl_audio
library
Functions
-
sdlAudioDevicePaused(int dev)
→ bool
-
Use this function to query if an audio device is paused.
-
sdlBindAudioStream(int devid, Pointer<SdlAudioStream> stream)
→ bool
-
Bind a single audio stream to an audio device.
-
sdlBindAudioStreams(int devid, Pointer<Pointer<SdlAudioStream>> streams, int numStreams)
→ bool
-
Bind a list of audio streams to an audio device.
-
sdlClearAudioStream(Pointer<SdlAudioStream> stream)
→ bool
-
Clear any pending data in the stream.
-
sdlCloseAudioDevice(int devid)
→ void
-
Close a previously-opened audio device.
-
sdlConvertAudioSamples(Pointer<SdlAudioSpec> srcSpec, Pointer<Uint8> srcData, int srcLen, Pointer<SdlAudioSpec> dstSpec, Pointer<Pointer<Uint8>> dstData, Pointer<Int32> dstLen)
→ bool
-
Convert some audio data of one format to another format.
-
sdlCreateAudioStream(Pointer<SdlAudioSpec> srcSpec, Pointer<SdlAudioSpec> dstSpec)
→ Pointer<SdlAudioStream>
-
Create a new audio stream.
-
sdlDestroyAudioStream(Pointer<SdlAudioStream> stream)
→ void
-
Free an audio stream.
-
sdlFlushAudioStream(Pointer<SdlAudioStream> stream)
→ bool
-
Tell the stream that you're done sending data, and anything being buffered
should be converted/resampled and made available immediately.
-
sdlGetAudioDeviceChannelMap(int devid, Pointer<Int32> count)
→ Pointer<Int32>
-
Get the current channel map of an audio device.
-
sdlGetAudioDeviceFormat(int devid, Pointer<SdlAudioSpec> spec, Pointer<Int32> sampleFrames)
→ bool
-
Get the current audio format of a specific audio device.
-
sdlGetAudioDeviceGain(int devid)
→ double
-
Get the gain of an audio device.
-
sdlGetAudioDeviceName(int devid)
→ String?
-
Get the human-readable name of a specific audio device.
-
sdlGetAudioDriver(int index)
→ String?
-
Use this function to get the name of a built in audio driver.
-
sdlGetAudioFormatName(int format)
→ String?
-
Get the human readable name of an audio format.
-
sdlGetAudioPlaybackDevices(Pointer<Int32> count)
→ Pointer<Uint32>
-
Get a list of currently-connected audio playback devices.
-
sdlGetAudioRecordingDevices(Pointer<Int32> count)
→ Pointer<Uint32>
-
Get a list of currently-connected audio recording devices.
-
sdlGetAudioStreamAvailable(Pointer<SdlAudioStream> stream)
→ int
-
Get the number of converted/resampled bytes available.
-
sdlGetAudioStreamData(Pointer<SdlAudioStream> stream, Pointer<NativeType> buf, int len)
→ int
-
Get converted/resampled data from the stream.
-
sdlGetAudioStreamDevice(Pointer<SdlAudioStream> stream)
→ int
-
Query an audio stream for its currently-bound device.
-
sdlGetAudioStreamFormat(Pointer<SdlAudioStream> stream, Pointer<SdlAudioSpec> srcSpec, Pointer<SdlAudioSpec> dstSpec)
→ bool
-
Query the current format of an audio stream.
-
sdlGetAudioStreamFrequencyRatio(Pointer<SdlAudioStream> stream)
→ double
-
Get the frequency ratio of an audio stream.
-
sdlGetAudioStreamGain(Pointer<SdlAudioStream> stream)
→ double
-
Get the gain of an audio stream.
-
sdlGetAudioStreamInputChannelMap(Pointer<SdlAudioStream> stream, Pointer<Int32> count)
→ Pointer<Int32>
-
Get the current input channel map of an audio stream.
-
sdlGetAudioStreamOutputChannelMap(Pointer<SdlAudioStream> stream, Pointer<Int32> count)
→ Pointer<Int32>
-
Get the current output channel map of an audio stream.
-
sdlGetAudioStreamProperties(Pointer<SdlAudioStream> stream)
→ int
-
Get the properties associated with an audio stream.
-
sdlGetAudioStreamQueued(Pointer<SdlAudioStream> stream)
→ int
-
Get the number of bytes currently queued.
-
sdlGetCurrentAudioDriver()
→ String?
-
Get the name of the current audio driver.
-
sdlGetNumAudioDrivers()
→ int
-
Use this function to get the number of built-in audio drivers.
-
sdlGetSilenceValueForFormat(int format)
→ int
-
Get the appropriate memset value for silencing an audio format.
-
sdlIsAudioDevicePhysical(int devid)
→ bool
-
Determine if an audio device is physical (instead of logical).
-
sdlIsAudioDevicePlayback(int devid)
→ bool
-
Determine if an audio device is a playback device (instead of recording).
-
sdlLoadWav(String? path, Pointer<SdlAudioSpec> spec, Pointer<Pointer<Uint8>> audioBuf, Pointer<Uint32> audioLen)
→ bool
-
Loads a WAV from a file path.
-
sdlLoadWavIo(Pointer<SdlIoStream> src, bool closeio, Pointer<SdlAudioSpec> spec, Pointer<Pointer<Uint8>> audioBuf, Pointer<Uint32> audioLen)
→ bool
-
Load the audio data of a WAVE file into memory.
-
sdlLockAudioStream(Pointer<SdlAudioStream> stream)
→ bool
-
Lock an audio stream for serialized access.
-
sdlMixAudio(Pointer<Uint8> dst, Pointer<Uint8> src, int format, int len, double volume)
→ bool
-
Mix audio data in a specified format.
-
sdlOpenAudioDevice(int devid, Pointer<SdlAudioSpec> spec)
→ int
-
Open a specific audio device.
-
sdlOpenAudioDeviceStream(int devid, Pointer<SdlAudioSpec> spec, Pointer<NativeFunction<SdlAudioStreamCallback>> callback, Pointer<NativeType> userdata)
→ Pointer<SdlAudioStream>
-
Convenience function for straightforward audio init for the common case.
-
sdlPauseAudioDevice(int dev)
→ bool
-
Use this function to pause audio playback on a specified device.
-
sdlPauseAudioStreamDevice(Pointer<SdlAudioStream> stream)
→ bool
-
Use this function to pause audio playback on the audio device associated
with an audio stream.
-
sdlPutAudioStreamData(Pointer<SdlAudioStream> stream, Pointer<NativeType> buf, int len)
→ bool
-
Add data to the stream.
-
sdlResumeAudioDevice(int dev)
→ bool
-
Use this function to unpause audio playback on a specified device.
-
sdlResumeAudioStreamDevice(Pointer<SdlAudioStream> stream)
→ bool
-
Use this function to unpause audio playback on the audio device associated
with an audio stream.
-
sdlSetAudioDeviceGain(int devid, double gain)
→ bool
-
Change the gain of an audio device.
-
sdlSetAudioPostmixCallback(int devid, Pointer<NativeFunction<SdlAudioPostmixCallback>> callback, Pointer<NativeType> userdata)
→ bool
-
Set a callback that fires when data is about to be fed to an audio device.
-
sdlSetAudioStreamFormat(Pointer<SdlAudioStream> stream, Pointer<SdlAudioSpec> srcSpec, Pointer<SdlAudioSpec> dstSpec)
→ bool
-
Change the input and output formats of an audio stream.
-
sdlSetAudioStreamFrequencyRatio(Pointer<SdlAudioStream> stream, double ratio)
→ bool
-
Change the frequency ratio of an audio stream.
-
sdlSetAudioStreamGain(Pointer<SdlAudioStream> stream, double gain)
→ bool
-
Change the gain of an audio stream.
-
sdlSetAudioStreamGetCallback(Pointer<SdlAudioStream> stream, Pointer<NativeFunction<SdlAudioStreamCallback>> callback, Pointer<NativeType> userdata)
→ bool
-
Set a callback that runs when data is requested from an audio stream.
-
sdlSetAudioStreamInputChannelMap(Pointer<SdlAudioStream> stream, Pointer<Int32> chmap, int count)
→ bool
-
Set the current input channel map of an audio stream.
-
sdlSetAudioStreamOutputChannelMap(Pointer<SdlAudioStream> stream, Pointer<Int32> chmap, int count)
→ bool
-
Set the current output channel map of an audio stream.
-
sdlSetAudioStreamPutCallback(Pointer<SdlAudioStream> stream, Pointer<NativeFunction<SdlAudioStreamCallback>> callback, Pointer<NativeType> userdata)
→ bool
-
Set a callback that runs when data is added to an audio stream.
-
sdlUnbindAudioStream(Pointer<SdlAudioStream> stream)
→ void
-
Unbind a single audio stream from its audio device.
-
sdlUnbindAudioStreams(Pointer<Pointer<SdlAudioStream>> streams, int numStreams)
→ void
-
Unbind a list of audio streams from their audio devices.
-
sdlUnlockAudioStream(Pointer<SdlAudioStream> stream)
→ bool
-
Unlock an audio stream for serialized access.