Skip to content

raylib.UpdateSound

JoeStrout edited this page Apr 29, 2026 · 2 revisions

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

Parameters

Parameter Default Value Note
sound
data
sampleCount

Return value

None.

Notes

Example

raylib.InitAudioDevice
sound = raylib.LoadSound("resources/beep.wav")
// replace the sound buffer with new raw audio data:
raylib.UpdateSound sound, newData, frameCount
raylib.PlaySound sound
raylib.UnloadSound sound
raylib.CloseAudioDevice

Clone this wiki locally