Skip to content

raylib.UpdateSound

JoeStrout edited this page Nov 16, 2026 · 4 revisions

Update sound buffer with new data from a RawData. The data format must match the sound's stream sampleSize and channels (by default 32-bit float, stereo); frameCount must be greater than 0 and not exceed the sound's frameCount

Parameters

Parameter Default Value Note
sound
data
frameCount

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