FabGL
ESP32 Display Controller and Graphics Library

◆ playSamples()

SamplesGenerator * playSamples ( int8_t const *  data,
int  length,
int  volume = 100,
int  durationMS = 0 
)

Plays the specified samples.

Starts immediately to play the specified samples. It is not required to call play(). This method returns without wait the end of sound.

Parameters
dataSamples to play.
lengthNumber of samples to play.
volumeVolume value. Minimum is 0, maximum is 127.
durationMSDuration in milliseconds. 0 = untile end of samples, -1 = infinite loop.
Returns
Pointer to SamplesGenerator object. Lifetime of this object is limited to the duration.

Definition at line 669 of file soundgen.cpp.