Skip to content

Commit 1835217

Browse files
Added NoAudioSound class constructor docs
1 parent 5c3ad36 commit 1835217

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

src/sound/noaudio/NoAudioSound.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,25 @@ var Class = require('../../utils/Class');
22
var EventEmitter = require('eventemitter3');
33
var Extend = require('../../utils/object/Extend');
44
var BaseSound = require('../BaseSound');
5+
/*!
6+
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
7+
*/
58
var NoAudioSound = new Class({
69
Extends: EventEmitter,
10+
/**
11+
* No audio implementation of the sound. It is used if audio has been
12+
* disabled in the game config or the device doesn't support any audio.
13+
*
14+
* It represents a graceful degradation of sound logic that provides
15+
* minimal functionality and prevents Phaser projects that use audio from
16+
* breaking on devices that don't support any audio playback technologies.
17+
*
18+
* @class Phaser.Sound.NoAudioSound
19+
* @constructor
20+
* @param {Phaser.Sound.NoAudioSoundManager} manager - Reference to the current sound manager instance.
21+
* @param {string} key - Asset key for the sound.
22+
* @param {ISoundConfig} [config={}] - An optional config object containing default sound settings.
23+
*/
724
initialize: function NoAudioSound(manager, key, config) {
825
EventEmitter.call(this);
926
this.manager = manager;

0 commit comments

Comments
 (0)