Flint Engine
Modular C++20 2D game engine powered by SDL3
Loading...
Searching...
No Matches

◆ playSound()

bool Flint::Audio::playSound ( int id,
bool loop = false,
float volume = 1.0f,
float pitch = 1.0f )

Begin playback of a previously loaded sound.

Parameters
idSound ID returned by loadSound().
loopIf true the sound loops indefinitely until stopped.
volumeLinear gain in [0, 1] (1.0 = original level).
pitchFrequency ratio (1.0 = original pitch).
Returns
true if playback was started successfully, false otherwise.