Sample(filename)

new Sample(filename)

Load a WAV-file.
Parameters:
Name Type Description
filename string

Members

static filename

Name of the WAV.

static frequency

Sound frequency.

static length

Sound length.

Methods

Play(volume, panning, loop)

Play the WAV.
Parameters:
Name Type Description
volume number between 0-255.
panning number between (left) 0-255 (right).
loop boolean true := sample will loop, false := sample will only be played once.

Stop()

Stop playing.