Merge pull request #691 from VisualSJ/master_audioloader

修复音效无法播放的问题
This commit is contained in:
Wang Nan
2016-05-19 09:42:21 +08:00
2 changed files with 14 additions and 6 deletions
+13 -5
View File
@@ -241,12 +241,20 @@ JS.mixin(LoadingItems.prototype, CallbacksInvoker.prototype, {
* @param {String} url
*/
removeItem: function (url) {
if (this.completed[url]) {
delete this.completed[url];
delete this.map[url];
this.completedCount--;
this.totalCount--;
var item = this.map[url];
if (!item) return;
if (!this.completed[item.alias || url]) return;
delete this.completed[url];
delete this.map[url];
if (item.alias) {
delete this.completed[item.alias];
delete this.map[item.alias];
}
this.completedCount--;
this.totalCount--;
},
complete: function (url) {
+1 -1
View File
@@ -747,7 +747,7 @@ else {
// check Web Audio's context
var supportWebAudio = !!(window.AudioContext || window.webkitAudioContext || window.mozAudioContext);
__audioSupport = { ONLY_ONE: true, WEB_AUDIO: supportWebAudio, DELAY_CREATE_CTX: false };
__audioSupport = { ONLY_ONE: false, WEB_AUDIO: supportWebAudio, DELAY_CREATE_CTX: false };
if (sys.browserType === sys.BROWSER_TYPE_FIREFOX) {
__audioSupport.DELAY_CREATE_CTX = true;