Wave

class Wave(raw: ERROR CLASS: Symbol not found for CPointer<ERROR CLASS: Symbol not found for raylib.internal.Wave>)

Represents a wave in raylib, which is a raw audio data structure that can be loaded from a file or generated procedurally.

Constructors

Link copied to clipboard
constructor(raw: ERROR CLASS: Symbol not found for CPointer<ERROR CLASS: Symbol not found for raylib.internal.Wave>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The number of channels in the wave, which can be set to any positive integer value.

Link copied to clipboard
var data: ERROR CLASS: Symbol not found for UByteArray

The raw audio data of the wave, which can be set to any byte array of the appropriate size.

Link copied to clipboard

The frame count of the wave, which can be set to any positive integer value.

Link copied to clipboard

The sample rate of the wave, which can be set to any positive integer value.

Link copied to clipboard

The sample size of the wave, which can be set to any positive integer value.

Functions

Link copied to clipboard
fun crop(start: Int, end: Int)

Crops this wave to the specified start and end frame indices, which can be set to any positive integer values between 0 and frameCount - 1.

Link copied to clipboard
fun format(sampleRate: Int, sampleSize: Int, channels: Int)

Formats this wave with the specified sample rate, sample size, and number of channels, which can be set to any positive integer values.

Link copied to clipboard

Loads the samples of the wave into a float array, which can be used for audio processing or analysis. The size of the returned float array will be equal to the frame count of the wave multiplied by the number of channels in the wave.

Link copied to clipboard
fun unload(): ERROR CLASS: Unresolved name: UnloadWave

Unloads the wave from memory. This should be called when the wave is no longer needed to free up resources.