Skip to content
JoeStrout edited this page Apr 15, 2026 · 1 revision

RAudio

Name Parameters Purpose
InitAudioDevice Initialize audio device
CloseAudioDevice Close the audio device for all contexts
IsAudioDeviceReady Check if device has been initialized successfully
SetMasterVolume volume=1.0 Set master volume (listener)
GetMasterVolume Get master volume (listener)
LoadWave fileName Load wave data from file
LoadWaveFromMemory fileType, fileData, dataSize Load wave from memory buffer, fileType refers to extension: i.e. ".wav" WARNING: File extension must be provided in lower-case
CreateWave frameCount, sampleRate, sampleSize, channels, samples
IsWaveValid wave Checks if wave data is valid (data loaded and parameters)
UnloadWave wave Unload wave data
LoadWaveSamples wave Load samples data from wave as a floats array NOTE 1: Returned sample values are normalized to range [-1..1] NOTE 2: Sample data allocated should be freed with UnloadWaveSamples()
UnloadWaveSamples samples Unload samples data loaded with LoadWaveSamples()
WaveCopy wave Copy a wave to a new wave
WaveCrop wave, initFrame=0, finalFrame=100 Crop a wave to defined frames range NOTE: Security check in case of out-of-range
WaveFormat wave, sampleRate=44100, sampleSize=16, channels=2 Convert wave data to desired format
LoadMusicStream fileName Load music stream from file
LoadMusicStreamFromMemory fileType, data, dataSize Load music stream from memory buffer, fileType refers to extension: i.e. ".wav" WARNING: File extension must be provided in lower-case
IsMusicValid music Checks if a music stream is valid (context and buffers initialized)
UnloadMusicStream music Unload music stream
PlayMusicStream music Start music playing (open stream) from beginning
IsMusicStreamPlaying music Check if any music is playing
UpdateMusicStream music Update (re-fill) music buffers if data already processed
StopMusicStream music Stop music playing (close stream)
PauseMusicStream music Pause music playing
ResumeMusicStream music Resume music playing
SeekMusicStream music, position=0 Seek music to a certain position (in seconds)
SetMusicVolume music, volume=1.0 Set volume for music
SetMusicPitch music, pitch=1.0 Set pitch for music
SetMusicPan music, pan=0.5 Set pan for a music
GetMusicTimeLength music Get music time length (in seconds)
GetMusicTimePlayed music Get current music time played (in seconds)
LoadSound fileName Load sound from file NOTE: The entire file is loaded to memory to be played (no-streaming)
LoadSoundFromWave wave Load sound from wave data NOTE: Wave data must be unallocated manually
LoadSoundAlias source Clone sound from existing sound data, clone does not own wave data NOTE: Wave data must be unallocated manually and will be shared across all clones
IsSoundValid sound Checks if a sound is valid (data loaded and buffers initialized)
UnloadSound sound Unload sound
UnloadSoundAlias alias Also delete the heap-allocated Sound
PlaySound sound Play a sound
StopSound sound Stop reproducing a sound
PauseSound sound Pause a sound
ResumeSound sound Resume a paused sound
IsSoundPlaying sound Check if a sound is playing
UpdateSound sound, data, sampleCount Update sound buffer with new data PARAMS: [data], format must match sound.stream.sampleSize, default 32 bit float - stereo PARAMS: [frameCount] must not exceed sound.frameCount
SetSoundVolume sound, volume=1.0 Set volume for a sound
SetSoundPitch sound, pitch=1.0 Set pitch for a sound
SetSoundPan sound, pan=0.5 Set pan for a sound
LoadAudioStream sampleRate=44100, sampleSize=32, channels=1 Load audio stream (to stream audio pcm data)
IsAudioStreamValid stream Checks if an audio stream is valid (buffers initialized)
UnloadAudioStream stream Unload audio stream and free memory
UpdateAudioStream stream, data Update audio stream buffers with data NOTE 1: Only updates one buffer of the stream source: dequeue -> update -> queue NOTE 2: To dequeue a buffer it needs to be processed: IsAudioStreamProcessed()
IsAudioStreamProcessed stream Check if any audio stream buffers requires refill
PlayAudioStream stream Play audio stream
PauseAudioStream stream Play audio stream
ResumeAudioStream stream Resume audio stream playing
IsAudioStreamPlaying stream Check if audio stream is playing
StopAudioStream stream Stop audio stream
SetAudioStreamVolume stream, volume=1.0 Set volume for audio stream (1.0 is max level)
SetAudioStreamPitch stream, pitch=1.0 Set pitch for audio stream (1.0 is base level)
SetAudioStreamPan stream, pan=0.5 Set pan for audio stream
SetAudioStreamBufferSizeDefault size=4096 Default size for new audio streams

Clone this wiki locally