Commit ca236791 authored by liujiaxin's avatar liujiaxin

1

parent 138a00af
...@@ -14,6 +14,9 @@ var DISPLAY_MODE = cc.Enum({ ...@@ -14,6 +14,9 @@ var DISPLAY_MODE = cc.Enum({
const LINE_BEAKER = '<br/>'; // '\n' const LINE_BEAKER = '<br/>'; // '\n'
const SPACE = ' '; const SPACE = ' ';
class MyAudioSource {
// clip: null,
}
/** /**
* 1.添加空节点,设置节点大小,拖入该脚本 * 1.添加空节点,设置节点大小,拖入该脚本
...@@ -997,13 +1000,33 @@ cc.Class({ ...@@ -997,13 +1000,33 @@ cc.Class({
console.log('onDestroy onDestroy'); console.log('onDestroy onDestroy');
// audioEngine.uncache(this.audioUrl); // audioEngine.uncache(this.audioUrl);
audioEngine.stop(this._currentAudioId); audioEngine.stop(this._currentAudioId);
this._audioSource._destruct();
this._audioACSource._destruct();
this._audioSource.destroy();
this._audioACSource.destroy(); // if (this._audioSource && this._audioSource.audio) {
// this._audioSource.stop();
// this._audioSource.audio.destroy();
// this._audioSource.audio = null;
// // this._audioSource._destruct();
// }
// if (this._audioACSource && this._audioACSource.audio) {
// this._audioACSource.stop();
// this._audioACSource.audio.destroy();
// this._audioACSource.audio = null;
// // this._audioSource._destruct();
// }
// if (this._audioSource && this._audioSource.isValid) {
// this._audioSource.destroy();
// // this._audioSource._destruct();
// }
// if (this._audioACSource && this._audioACSource.isValid) {
// this._audioACSource.destroy();
// // this._audioACSource._destruct();
// }
// this._audioSource = null; // this._audioSource = null;
// this._audioACSource = null; // this._audioACSource = null;
this._destruct(); // this._destruct();
} }
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment