Skip to content

raylib.CreateWave

JoeStrout edited this page Nov 16, 2026 · 3 revisions

Create a Wave from samples: frameCount frames at sampleRate Hz, with sampleSize 8, 16 or 32 (float) bits and the given number of channels. samples is a RawData of exactly that size, or a list of frameCount * channels values. Returns null if they don't agree

Parameters

Parameter Default Value Note
frameCount
sampleRate
sampleSize
channels
samples

Return value

Condition Return Value
(always) map

Notes

Example

raylib.InitAudioDevice
wave = raylib.CreateWave(1, 44100, 16)
if raylib.IsWaveValid(wave) then print "Wave created successfully"
raylib.UnloadWave wave
raylib.CloseAudioDevice

Clone this wiki locally