2018-01-20 19:56:49 +00:00
|
|
|
var Class = require('../../utils/Class');
|
|
|
|
var EventEmitter = require('eventemitter3');
|
2018-01-20 20:07:00 +00:00
|
|
|
var Extend = require('../utils/object/Extend');
|
2018-01-20 19:56:49 +00:00
|
|
|
var NoAudioSound = new Class({
|
|
|
|
Extends: EventEmitter,
|
|
|
|
initialize: function NoAudioSound(manager, key, config) {
|
|
|
|
EventEmitter.call(this);
|
2018-01-20 19:58:02 +00:00
|
|
|
this.manager = manager;
|
2018-01-20 19:58:31 +00:00
|
|
|
this.key = key;
|
2018-01-20 19:59:13 +00:00
|
|
|
this.isPlaying = false;
|
2018-01-20 19:59:27 +00:00
|
|
|
this.isPaused = false;
|
2018-01-20 20:00:31 +00:00
|
|
|
this.totalRate = 1;
|
2018-01-20 20:00:50 +00:00
|
|
|
this.duration = 0;
|
2018-01-20 20:01:04 +00:00
|
|
|
this.totalDuration = 0;
|
2018-01-20 20:07:00 +00:00
|
|
|
this.config = Extend({
|
|
|
|
mute: false,
|
|
|
|
volume: 1,
|
|
|
|
rate: 1,
|
|
|
|
detune: 0,
|
|
|
|
seek: 0,
|
|
|
|
loop: false,
|
|
|
|
delay: 0
|
|
|
|
}, config);
|
2018-01-20 20:07:30 +00:00
|
|
|
this.currentConfig = this.config;
|
2018-01-20 20:07:54 +00:00
|
|
|
this.mute = false;
|
2018-01-20 20:08:08 +00:00
|
|
|
this.volume = 1;
|
2018-01-20 20:08:21 +00:00
|
|
|
this.rate = 1;
|
2018-01-20 20:08:34 +00:00
|
|
|
this.detune = 0;
|
2018-01-20 20:08:47 +00:00
|
|
|
this.seek = 0;
|
2018-01-20 20:09:08 +00:00
|
|
|
this.loop = false;
|
2018-01-20 20:09:28 +00:00
|
|
|
this.markers = {};
|
2018-01-20 19:56:49 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
module.exports = NoAudioSound;
|