phaser/src/sound/index.js

55 lines
2.1 KiB
JavaScript
Raw Normal View History

2018-02-12 16:01:20 +00:00
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
2018-01-31 13:54:44 +00:00
/**
* @namespace Phaser.Sound
2018-02-18 15:06:40 +00:00
*
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
2018-01-31 13:54:44 +00:00
*/
/**
* Config object containing various sound settings.
*
* @typedef {object} SoundConfig
*
* @property {boolean} [mute=false] - Boolean indicating whether the sound should be muted or not.
* @property {number} [volume=1] - A value between 0 (silence) and 1 (full volume).
* @property {number} [rate=1] - Defines the speed at which the sound should be played.
* @property {number} [detune=0] - Represents detuning of sound in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).
* @property {number} [seek=0] - Position of playback for this sound, in seconds.
* @property {boolean} [loop=false] - Whether or not the sound or current sound marker should loop.
* @property {number} [delay=0] - Time, in seconds, that should elapse before the sound actually starts its playback.
*/
/**
* Marked section of a sound represented by name, and optionally start time, duration, and config object.
*
* @typedef {object} SoundMarker
*
* @property {string} name - Unique identifier of a sound marker.
* @property {number} [start=0] - Sound position offset at witch playback should start.
* @property {number} [duration] - Playback duration of this marker.
* @property {SoundConfig} [config] - An optional config object containing default marker settings.
*/
module.exports = {
SoundManagerCreator: require('./SoundManagerCreator'),
BaseSound: require('./BaseSound'),
BaseSoundManager: require('./BaseSoundManager'),
2017-11-14 15:00:24 +00:00
WebAudioSound: require('./webaudio/WebAudioSound'),
2017-12-22 14:47:37 +00:00
WebAudioSoundManager: require('./webaudio/WebAudioSoundManager'),
HTML5AudioSound: require('./html5/HTML5AudioSound'),
2018-01-20 21:06:36 +00:00
HTML5AudioSoundManager: require('./html5/HTML5AudioSoundManager'),
NoAudioSound: require('./noaudio/NoAudioSound'),
NoAudioSoundManager: require('./noaudio/NoAudioSoundManager')
};