Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sb_karaoke_cocos
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
sb_karaoke_cocos
Commits
ca236791
Commit
ca236791
authored
Dec 17, 2021
by
liujiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
138a00af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
5 deletions
+28
-5
karaoke.js
...ts/sb_karaoke_cocos/components/karaoke/scripts/karaoke.js
+28
-5
No files found.
assets/sb_karaoke_cocos/components/karaoke/scripts/karaoke.js
View file @
ca236791
...
...
@@ -14,6 +14,9 @@ var DISPLAY_MODE = cc.Enum({
const
LINE_BEAKER
=
'
<br/>
'
;
// '\n'
const
SPACE
=
'
'
;
class
MyAudioSource
{
// clip: null,
}
/**
* 1.添加空节点,设置节点大小,拖入该脚本
...
...
@@ -997,13 +1000,33 @@ cc.Class({
console
.
log
(
'
onDestroy onDestroy
'
);
// audioEngine.uncache(this.audioUrl);
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._audioACSource = null;
this
.
_destruct
();
//
this._destruct();
}
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment