mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2025-10-09 03:45:23 +00:00
[adapters] 完成音频系统的多线程支持
This commit is contained in:
@@ -7,7 +7,9 @@ if (Audio) {
|
||||
let elem = this._src._nativeAsset;
|
||||
// Reuse dom audio element
|
||||
if (!this._element) {
|
||||
this._element = __globalAdapter.createInnerAudioContext();
|
||||
this._element = CC_WORKER_AUDIO_SYSTEM
|
||||
? new WorkerAudio()
|
||||
: __globalAdapter.createInnerAudioContext();
|
||||
}
|
||||
this._element.src = elem.src;
|
||||
},
|
||||
|
Reference in New Issue
Block a user