RaylibAudio class

Inheritance

Constructors

RaylibAudio(Raylib rl)

Properties

$ → RaylibTemp<RaylibBase>
See RaylibTemp.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
rl → Raylib
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

AttachAudioMixedProcessor(AudioCallbackC processor) → void
Attach audio stream processor to the entire audio pipeline, receives the samples as 'float'
AttachAudioStreamProcessor(AudioStreamC stream, AudioCallbackC processor) → void
Attach audio stream processor to stream, receives the samples as 'float'
CloseAudioDevice() → void
Close the audio device and context
debug(bool v) → void
Enables or disables debug logging for this module.
inherited
debugError(String message) → void
Logs message at error level if debug is enabled and message passes all filters.
inherited
debugFilter(bool filter(String)) → void
Adds a predicate that gates debug output. Only messages satisfying at least one filter are logged.
inherited
debugInfo(String message) → void
Logs message at info level if debug is enabled and message passes all filters.
inherited
debugTime(bool v) → void
Enables or disables per-call timing output alongside debug logs.
inherited
debugWarn(String message) → void
Logs message at warn level if debug is enabled and message passes all filters.
inherited
DetachAudioMixedProcessor(AudioCallbackC processor) → void
Detach audio stream processor from the entire audio pipeline
DetachAudioStreamProcessor(AudioStreamC stream, AudioCallbackC processor) → void
Detach audio stream processor from stream
disableSync<T>(T f()) → T
Executes f with RaylibTemp syncing temporarily disabled, restoring the previous sync state afterward.
inherited
dispose() → void
Calls all registered onDispose callbacks and clears them.
inherited
disposeStructWithOpFreed<D extends RaylibStruct<D>>(D struct, void fn(StructPointer<D> ptr)) → void
Disposes struct, invokes fn with its underlying pointer, and then frees the temporary allocation backing the pointer, if any.
inherited
disposeStructWithOpUnslotted<D extends RaylibStruct<D>>(D struct, void fn(StructPointer<D> ptr)) → void
Disposes struct, invokes fn with its underlying pointer, and then unslots the temporary allocation backing the pointer, if any.
inherited
ExportWave(WaveC wave, Pointer<Char> fileName) → bool
Export wave data to file, returns true on success
ExportWaveAsCode(WaveC wave, Pointer<Char> fileName) → bool
Export wave sample data to code (.h), returns true on success
GetMasterVolume() → double
Get master volume (listener)
GetMusicTimeLength(MusicC music) → double
Get music time length (in seconds)
GetMusicTimePlayed(MusicC music) → double
Get current music time played (in seconds)
InitAudioDevice() → void
Initialize audio device and context
IsAudioDeviceReady() → bool
Check if audio device has been initialized successfully
IsAudioStreamPlaying(AudioStreamC stream) → bool
Check if audio stream is playing
IsAudioStreamProcessed(AudioStreamC stream) → bool
Check if any audio stream buffers requires refill
IsAudioStreamValid(AudioStreamC stream) → bool
Checks if an audio stream is valid (buffers initialized)
IsMusicStreamPlaying(MusicC music) → bool
Check if music is playing
IsMusicValid(MusicC music) → bool
Checks if a music stream is valid (context and buffers initialized)
IsSoundPlaying(SoundC sound) → bool
Check if a sound is currently playing
IsSoundValid(SoundC sound) → bool
Checks if a sound is valid (data loaded and buffers initialized)
IsWaveValid(WaveC wave) → bool
Checks if wave data is valid (data loaded and parameters)
load() → void
Override to perform one-time module initialization.
inherited
LoadAudioStream(int sampleRate, int sampleSize, int channels) → AudioStreamC
Load audio stream (to stream raw audio pcm data)
LoadMusicStream(Pointer<Char> fileName) → MusicC
Load music stream from file
LoadMusicStreamFromMemory(Pointer<Char> fileType, Pointer<UnsignedChar> data, int dataSize) → MusicC
Load music stream from data
LoadSound(Pointer<Char> fileName) → SoundC
Load sound from file
LoadSoundAlias(SoundC source) → SoundC
Create a new sound that shares the same sample data as the source sound, does not own the sound data
LoadSoundFromWave(WaveC wave) → SoundC
Load sound from wave data
LoadWave(Pointer<Char> fileName) → WaveC
Load wave data from file
LoadWaveFromMemory(Pointer<Char> fileType, Pointer<UnsignedChar> fileData, int dataSize) → WaveC
Load wave from memory buffer, fileType refers to extension: i.e. '.wav'
LoadWaveSamples(WaveC wave) → Pointer<Float>
Load samples data from wave as a 32bit float data array
logError(Object? message) → void
inherited
logInfo(Object? message) → void
inherited
logWarn(Object? message) → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDispose(void fn()) → void
Registers fn to be called when this module is disposed.
inherited
PauseAudioStream(AudioStreamC stream) → void
Pause audio stream
PauseMusicStream(MusicC music) → void
Pause music playing
PauseSound(SoundC sound) → void
Pause a sound
PlayAudioStream(AudioStreamC stream) → void
Play audio stream
PlayMusicStream(MusicC music) → void
Start music playing
PlaySound(SoundC sound) → void
Play a sound
ResumeAudioStream(AudioStreamC stream) → void
Resume audio stream
ResumeMusicStream(MusicC music) → void
Resume playing paused music
ResumeSound(SoundC sound) → void
Resume a paused sound
run<T>(String name(), T f()) → T
Executes f, logging its label (and optionally timing it) when debug is enabled and the label passes all filters.
inherited
SeekMusicStream(MusicC music, double position) → void
Seek music to a position (in seconds)
SetAudioStreamBufferSizeDefault(int size) → void
Default size for new audio streams
SetAudioStreamCallback(AudioStreamC stream, AudioCallbackC callback) → void
Audio thread callback to request new data
SetAudioStreamPan(AudioStreamC stream, double pan) → void
Set pan for audio stream (0.5 is centered)
SetAudioStreamPitch(AudioStreamC stream, double pitch) → void
Set pitch for audio stream (1.0 is base level)
SetAudioStreamVolume(AudioStreamC stream, double volume) → void
Set volume for audio stream (1.0 is max level)
SetMasterVolume(double volume) → void
Set master volume (listener)
SetMusicPan(MusicC music, double pan) → void
Set pan for a music (0.5 is center)
SetMusicPitch(MusicC music, double pitch) → void
Set pitch for a music (1.0 is base level)
SetMusicVolume(MusicC music, double volume) → void
Set volume for music (1.0 is max level)
SetSoundPan(SoundC sound, double pan) → void
Set pan for a sound (-1.0 left, 0.0 center, 1.0 right)
SetSoundPitch(SoundC sound, double pitch) → void
Set pitch for a sound (1.0 is base level)
SetSoundVolume(SoundC sound, double volume) → void
Set volume for a sound (1.0 is max level)
StopAudioStream(AudioStreamC stream) → void
Stop audio stream
StopMusicStream(MusicC music) → void
Stop music playing
StopSound(SoundC sound) → void
Stop playing a sound
toString() → String
A string representation of this object.
inherited
UnloadAudioStream(AudioStreamC stream) → void
Unload audio stream and free memory
UnloadMusicStream(MusicC music) → void
Unload music stream
UnloadSound(SoundC sound) → void
Unload sound
UnloadSoundAlias(SoundC alias) → void
Unload a sound alias (does not deallocate sample data)
UnloadWave(WaveC wave) → void
Unload wave data
UnloadWaveSamples(Pointer<Float> samples) → void
Unload samples data loaded with LoadWaveSamples()
UpdateAudioStream(AudioStreamC stream, Pointer<Void> data, int frameCount) → void
Update audio stream buffers with data
UpdateMusicStream(MusicC music) → void
Updates buffers for music streaming
UpdateSound(SoundC sound, Pointer<Void> data, int sampleCount) → void
Update sound buffer with new data
WaveCopy(WaveC wave) → WaveC
Copy a wave to a new wave
WaveCrop(Pointer<WaveC> wave, int initFrame, int finalFrame) → void
Crop a wave to defined frames range
WaveFormat(Pointer<WaveC> wave, int sampleRate, int sampleSize, int channels) → void
Convert wave data to desired format

Operators

operator ==(Object other) → bool
The equality operator.
inherited