Module audio

Provides functions to load WAVE files.

The module creates sound instances which can be used to control the loaded audio file. The sound instances can be released again, to allow the memory to be reused if new audio files are loaded.

Info:

  • Copyright: 2022 Patrick Lang
  • Author: Patrick Lang

Functions

loadSoundFile (filePath) Loads a sound from a file.
releaseSound (sound) Allows the memory of a sound to be reused by a new sound.


Functions

loadSoundFile (filePath)
Loads a sound from a file.

Parameters:

  • filePath string The path to the sound file.

Returns:

    sound The loaded sound.
releaseSound (sound)
Allows the memory of a sound to be reused by a new sound. Using the sound after it has been released can lead to a wrong sound file being played.

Parameters:

  • sound sound The sound to release.
generated by LDoc 1.4.6 Last updated 2022-05-28 12:58:52