Recent Changes - Search:

edit SideBar

audio module

This module provides access to the host's audio hardware.

Functions

  • Player(options): Constructor for an audio player. This acquires access to the audio hardware. FIXME: Currently, no options are supported. The returned object provides the following functions:
    • play(data): Play back the specified array of numbers, which give audio samples.
    • stop(): Stop audio playback. After calling this, you will need a new instance of Player to resume playback.
  • ClipPlayer(url): Constructor for a clip player. This loads a sound clip from the given url.
    • play(): Play the audio clip.
    • stop(): Stop audio playback. After calling this, you will need a new instance of ClipPlayer to resume playback.

Events

  • done: (From ClipPlayer): Emitted when audio stops playing, due to reaching the end or to a stop().

Accessor Library

See Also


Back to Optional JavaScript Modules

Edit - History - Print - Recent Changes - Search
Page last modified on December 17, 2017, at 06:38 AM