mirror of
https://github.com/wechat-miniprogram/minigame-tuanjie-transform-sdk.git
synced 2026-04-22 01:35:56 +08:00
Auto-publish.
This commit is contained in:
parent
207766f6db
commit
b6b5b16bab
@ -6,13 +6,6 @@ Removed - 删除功能/接口
|
|||||||
Fixed - 修复问题
|
Fixed - 修复问题
|
||||||
Others - 其他
|
Others - 其他
|
||||||
-->
|
-->
|
||||||
## v0.1.26 【普通更新】
|
|
||||||
### Feature
|
|
||||||
* 普通:增加禁止多点触控的配置
|
|
||||||
### Fixed
|
|
||||||
* 普通:修复IOS长音频获取数据延迟的bug
|
|
||||||
* 普通:性能分析工具,修复callstack中的堆栈悬空丢失的问题
|
|
||||||
|
|
||||||
## v0.1.25 【普通更新】
|
## v0.1.25 【普通更新】
|
||||||
### Feature
|
### Feature
|
||||||
* 普通:性能深入分析工具,支持Lua capture能力
|
* 普通:性能深入分析工具,支持Lua capture能力
|
||||||
|
|||||||
@ -93,6 +93,14 @@ namespace WeChatWASM
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 用于replaceRules判断是否需要注入相关的修改
|
||||||
|
public static bool UseNativeCommandbuffer
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return config.CompileOptions.enableIOSNativeCommandbuffer;
|
||||||
|
}
|
||||||
|
}
|
||||||
// 可以调用这个来集成
|
// 可以调用这个来集成
|
||||||
public static WXExportError DoExport(bool buildWebGL = true)
|
public static WXExportError DoExport(bool buildWebGL = true)
|
||||||
{
|
{
|
||||||
@ -118,6 +126,7 @@ namespace WeChatWASM
|
|||||||
CheckBuildTarget();
|
CheckBuildTarget();
|
||||||
Init();
|
Init();
|
||||||
ProcessWxPerfBinaries();
|
ProcessWxPerfBinaries();
|
||||||
|
ProcessWxNativeCommandbufferBinaries();
|
||||||
MakeEnvForLuaAdaptor();
|
MakeEnvForLuaAdaptor();
|
||||||
// JSLib
|
// JSLib
|
||||||
SettingWXTextureMinJSLib();
|
SettingWXTextureMinJSLib();
|
||||||
@ -331,6 +340,39 @@ namespace WeChatWASM
|
|||||||
AssetDatabase.Refresh();
|
AssetDatabase.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void ProcessWxNativeCommandbufferBinaries()
|
||||||
|
{
|
||||||
|
string[] glLibs;
|
||||||
|
string DS = WXAssetsTextTools.DS;
|
||||||
|
if (UnityUtil.GetSDKMode() == UnityUtil.SDKMode.Package)
|
||||||
|
{
|
||||||
|
glLibs = new string[]
|
||||||
|
{
|
||||||
|
$"Packages{DS}com.qq.weixin.minigame{DS}Runtime{DS}Plugins{DS}libnative_command_buffer.a",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string glLibRootDir = $"Assets{DS}WX-WASM-SDK-V2{DS}Runtime{DS}Plugins{DS}";
|
||||||
|
glLibs = new string[]
|
||||||
|
{
|
||||||
|
$"{glLibRootDir}libnative_command_buffer.a",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
for (int i = 0; i < glLibs.Length; i++)
|
||||||
|
{
|
||||||
|
var importer = AssetImporter.GetAtPath(glLibs[i]) as PluginImporter;
|
||||||
|
#if PLATFORM_WEIXINMINIGAME
|
||||||
|
importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, config.CompileOptions.enableIOSNativeCommandbuffer);
|
||||||
|
#else
|
||||||
|
importer.SetCompatibleWithPlatform(BuildTarget.WebGL, config.CompileOptions.enableIOSNativeCommandbuffer);
|
||||||
|
#endif
|
||||||
|
// importer.SaveAndReimport();
|
||||||
|
SetPluginCompatibilityByModifyingMetadataFile(glLibs[i], config.CompileOptions.enableIOSNativeCommandbuffer);
|
||||||
|
}
|
||||||
|
AssetDatabase.Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lua Adaptor Settings.
|
* Lua Adaptor Settings.
|
||||||
*/
|
*/
|
||||||
@ -801,7 +843,8 @@ namespace WeChatWASM
|
|||||||
PlayerSettings.WeixinMiniGame.emscriptenArgs = string.Empty;
|
PlayerSettings.WeixinMiniGame.emscriptenArgs = string.Empty;
|
||||||
if (WXExtEnvDef.GETDEF("UNITY_2021_2_OR_NEWER"))
|
if (WXExtEnvDef.GETDEF("UNITY_2021_2_OR_NEWER"))
|
||||||
{
|
{
|
||||||
PlayerSettings.WeixinMiniGame.emscriptenArgs += " -s EXPORTED_FUNCTIONS=_main,_sbrk,_emscripten_stack_get_base,_emscripten_stack_get_end -s ERROR_ON_UNDEFINED_SYMBOLS=0";
|
// PlayerSettings.WeixinMiniGame.emscriptenArgs += " -s EXPORTED_FUNCTIONS=_main,_sbrk,_emscripten_stack_get_base,_emscripten_stack_get_end";
|
||||||
|
PlayerSettings.WeixinMiniGame.emscriptenArgs += " -s EXPORTED_FUNCTIONS=_sbrk,_emscripten_stack_get_base,_emscripten_stack_get_end -s ERROR_ON_UNDEFINED_SYMBOLS=0";
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@ -1908,7 +1951,6 @@ namespace WeChatWASM
|
|||||||
config.CompileOptions.DevelopBuild ? "true" : "false",
|
config.CompileOptions.DevelopBuild ? "true" : "false",
|
||||||
config.CompileOptions.enablePerfAnalysis ? "true" : "false",
|
config.CompileOptions.enablePerfAnalysis ? "true" : "false",
|
||||||
config.ProjectConf.MemorySize.ToString(),
|
config.ProjectConf.MemorySize.ToString(),
|
||||||
config.SDKOptions.disableMultiTouch ? "true" : "false",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
List<Rule> replaceList = new List<Rule>(replaceArrayList);
|
List<Rule> replaceList = new List<Rule>(replaceArrayList);
|
||||||
|
|||||||
@ -170,7 +170,6 @@ namespace WeChatWASM
|
|||||||
this.formCheckbox("useFriendRelation", "使用好友关系链");
|
this.formCheckbox("useFriendRelation", "使用好友关系链");
|
||||||
this.formCheckbox("useMiniGameChat", "使用社交组件");
|
this.formCheckbox("useMiniGameChat", "使用社交组件");
|
||||||
this.formCheckbox("preloadWXFont", "预加载微信字体(?)", "在game.js执行开始时预载微信系统字体,运行期间可使用WX.GetWXFont获取微信字体");
|
this.formCheckbox("preloadWXFont", "预加载微信字体(?)", "在game.js执行开始时预载微信系统字体,运行期间可使用WX.GetWXFont获取微信字体");
|
||||||
this.formCheckbox("disableMultiTouch", "禁用多点触控");
|
|
||||||
|
|
||||||
EditorGUILayout.EndVertical();
|
EditorGUILayout.EndVertical();
|
||||||
}
|
}
|
||||||
@ -189,6 +188,7 @@ namespace WeChatWASM
|
|||||||
this.formCheckbox("profilingMemory", "Profiling Memory");
|
this.formCheckbox("profilingMemory", "Profiling Memory");
|
||||||
this.formCheckbox("webgl2", "WebGL2.0(beta)");
|
this.formCheckbox("webgl2", "WebGL2.0(beta)");
|
||||||
this.formCheckbox("iOSPerformancePlus", "iOSPerformancePlus(?)", "是否使用iOS高性能+渲染方案,有助于提升渲染兼容性、降低WebContent进程内存");
|
this.formCheckbox("iOSPerformancePlus", "iOSPerformancePlus(?)", "是否使用iOS高性能+渲染方案,有助于提升渲染兼容性、降低WebContent进程内存");
|
||||||
|
this.formCheckbox("iOSNativeCommandbuffer", "iOSNativeCmdbuffer(?)", "是否使用iOS高性能+ NativeCommandbuffer渲染方案");
|
||||||
this.formCheckbox("deleteStreamingAssets", "Clear Streaming Assets");
|
this.formCheckbox("deleteStreamingAssets", "Clear Streaming Assets");
|
||||||
this.formCheckbox("cleanBuild", "Clean WebGL Build");
|
this.formCheckbox("cleanBuild", "Clean WebGL Build");
|
||||||
// this.formCheckbox("cleanCloudDev", "Clean Cloud Dev");
|
// this.formCheckbox("cleanCloudDev", "Clean Cloud Dev");
|
||||||
@ -452,11 +452,11 @@ namespace WeChatWASM
|
|||||||
this.setData("customNodePath", config.CompileOptions.CustomNodePath);
|
this.setData("customNodePath", config.CompileOptions.CustomNodePath);
|
||||||
this.setData("webgl2", config.CompileOptions.Webgl2);
|
this.setData("webgl2", config.CompileOptions.Webgl2);
|
||||||
this.setData("iOSPerformancePlus", config.CompileOptions.enableIOSPerformancePlus);
|
this.setData("iOSPerformancePlus", config.CompileOptions.enableIOSPerformancePlus);
|
||||||
|
this.setData("iOSNativeCommandbuffer", config.CompileOptions.enableIOSNativeCommandbuffer);
|
||||||
this.setData("fbslim", config.CompileOptions.fbslim);
|
this.setData("fbslim", config.CompileOptions.fbslim);
|
||||||
this.setData("useFriendRelation", config.SDKOptions.UseFriendRelation);
|
this.setData("useFriendRelation", config.SDKOptions.UseFriendRelation);
|
||||||
this.setData("useMiniGameChat", config.SDKOptions.UseMiniGameChat);
|
this.setData("useMiniGameChat", config.SDKOptions.UseMiniGameChat);
|
||||||
this.setData("preloadWXFont", config.SDKOptions.PreloadWXFont);
|
this.setData("preloadWXFont", config.SDKOptions.PreloadWXFont);
|
||||||
this.setData("disableMultiTouch", config.SDKOptions.disableMultiTouch);
|
|
||||||
this.setData("bgImageSrc", config.ProjectConf.bgImageSrc);
|
this.setData("bgImageSrc", config.ProjectConf.bgImageSrc);
|
||||||
tex = AssetDatabase.LoadAssetAtPath<Texture>(config.ProjectConf.bgImageSrc);
|
tex = AssetDatabase.LoadAssetAtPath<Texture>(config.ProjectConf.bgImageSrc);
|
||||||
this.setData("memorySize", config.ProjectConf.MemorySize.ToString());
|
this.setData("memorySize", config.ProjectConf.MemorySize.ToString());
|
||||||
@ -530,11 +530,11 @@ namespace WeChatWASM
|
|||||||
config.CompileOptions.CustomNodePath = this.getDataInput("customNodePath");
|
config.CompileOptions.CustomNodePath = this.getDataInput("customNodePath");
|
||||||
config.CompileOptions.Webgl2 = this.getDataCheckbox("webgl2");
|
config.CompileOptions.Webgl2 = this.getDataCheckbox("webgl2");
|
||||||
config.CompileOptions.enableIOSPerformancePlus = this.getDataCheckbox("iOSPerformancePlus");
|
config.CompileOptions.enableIOSPerformancePlus = this.getDataCheckbox("iOSPerformancePlus");
|
||||||
|
config.CompileOptions.enableIOSNativeCommandbuffer = this.getDataCheckbox("iOSNativeCommandbuffer");
|
||||||
config.CompileOptions.fbslim = this.getDataCheckbox("fbslim");
|
config.CompileOptions.fbslim = this.getDataCheckbox("fbslim");
|
||||||
config.SDKOptions.UseFriendRelation = this.getDataCheckbox("useFriendRelation");
|
config.SDKOptions.UseFriendRelation = this.getDataCheckbox("useFriendRelation");
|
||||||
config.SDKOptions.UseMiniGameChat = this.getDataCheckbox("useMiniGameChat");
|
config.SDKOptions.UseMiniGameChat = this.getDataCheckbox("useMiniGameChat");
|
||||||
config.SDKOptions.PreloadWXFont = this.getDataCheckbox("preloadWXFont");
|
config.SDKOptions.PreloadWXFont = this.getDataCheckbox("preloadWXFont");
|
||||||
config.SDKOptions.disableMultiTouch = this.getDataCheckbox("disableMultiTouch");
|
|
||||||
config.ProjectConf.bgImageSrc = this.getDataInput("bgImageSrc");
|
config.ProjectConf.bgImageSrc = this.getDataInput("bgImageSrc");
|
||||||
config.ProjectConf.MemorySize = int.Parse(this.getDataInput("memorySize"));
|
config.ProjectConf.MemorySize = int.Parse(this.getDataInput("memorySize"));
|
||||||
config.ProjectConf.HideAfterCallMain = this.getDataCheckbox("hideAfterCallMain");
|
config.ProjectConf.HideAfterCallMain = this.getDataCheckbox("hideAfterCallMain");
|
||||||
|
|||||||
@ -125,6 +125,10 @@ namespace WeChatWASM
|
|||||||
{
|
{
|
||||||
return WXConvertCore.UseIL2CPP;
|
return WXConvertCore.UseIL2CPP;
|
||||||
});
|
});
|
||||||
|
WXExtEnvDef.RegisterAction("WXConvertCore.UseNativeCommandbuffer", (args) =>
|
||||||
|
{
|
||||||
|
return WXConvertCore.UseNativeCommandbuffer;
|
||||||
|
});
|
||||||
WXExtEnvDef.RegisterAction("UnityUtil.GetWxSDKRootPath", (args) =>
|
WXExtEnvDef.RegisterAction("UnityUtil.GetWxSDKRootPath", (args) =>
|
||||||
{
|
{
|
||||||
#if UNITY_2018
|
#if UNITY_2018
|
||||||
|
|||||||
@ -2,7 +2,7 @@ namespace WeChatWASM
|
|||||||
{
|
{
|
||||||
public class WXPluginVersion
|
public class WXPluginVersion
|
||||||
{
|
{
|
||||||
public static string pluginVersion = "202505120809"; // 这一行不要改他,导出的时候会自动替换
|
public static string pluginVersion = "202506100940"; // 这一行不要改他,导出的时候会自动替换
|
||||||
}
|
}
|
||||||
|
|
||||||
public class WXPluginConf
|
public class WXPluginConf
|
||||||
|
|||||||
Binary file not shown.
@ -543,11 +543,6 @@
|
|||||||
预载系统字体
|
预载系统字体
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="F:WeChatWASM.SDKOptions.disableMultiTouch">
|
|
||||||
<summary>
|
|
||||||
是否禁止多点触控
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:WeChatWASM.CompileOptions.DevelopBuild">
|
<member name="F:WeChatWASM.CompileOptions.DevelopBuild">
|
||||||
<summary>
|
<summary>
|
||||||
Development Build
|
Development Build
|
||||||
@ -638,6 +633,11 @@
|
|||||||
是否使用iOS高性能Plus
|
是否使用iOS高性能Plus
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="F:WeChatWASM.CompileOptions.enableIOSNativeCommandbuffer">
|
||||||
|
<summary>
|
||||||
|
是否使用iOS高性能Plus NativeCommandbuffer
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="F:WeChatWASM.CompileOptions.brotliMT">
|
<member name="F:WeChatWASM.CompileOptions.brotliMT">
|
||||||
<summary>
|
<summary>
|
||||||
是否使用brotli多线程压缩
|
是否使用brotli多线程压缩
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 69a894eefcf7a97830ad465e4668424b
|
guid: a876093c0845eafc71827b33f04c10aa
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
BIN
Runtime/Plugins/libnative_command_buffer.a
Normal file
BIN
Runtime/Plugins/libnative_command_buffer.a
Normal file
Binary file not shown.
74
Runtime/Plugins/libnative_command_buffer.a.meta
Normal file
74
Runtime/Plugins/libnative_command_buffer.a.meta
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cccbd1d680cfe34fa1fef9e4875e5f06
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 1
|
||||||
|
isExplicitlyReferenced: 0
|
||||||
|
validateReferences: 1
|
||||||
|
platformData:
|
||||||
|
- first:
|
||||||
|
: Any
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
Exclude Editor: 0
|
||||||
|
Exclude Linux64: 0
|
||||||
|
Exclude OSXUniversal: 0
|
||||||
|
Exclude WebGL: 0
|
||||||
|
Exclude Win: 0
|
||||||
|
Exclude Win64: 0
|
||||||
|
- first:
|
||||||
|
Any:
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings: {}
|
||||||
|
- first:
|
||||||
|
Editor: Editor
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
DefaultValueInitialized: true
|
||||||
|
OS: AnyOS
|
||||||
|
- first:
|
||||||
|
Standalone: Linux64
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
- first:
|
||||||
|
Standalone: OSXUniversal
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
- first:
|
||||||
|
Standalone: Win
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
- first:
|
||||||
|
Standalone: Win64
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
- first:
|
||||||
|
WebGL: WebGL
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings: {}
|
||||||
|
- first:
|
||||||
|
WeixinMiniGame: WeixinMiniGame
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: e804d8e7fcbdd8120297b31d43cba494
|
guid: 542d2fb9b76a6e9d28738228a8c4ac1f
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: f1ac621062d513597aaf96b982e6d32a
|
guid: 3820097fcb1ba91d84e70e7230c30822
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -47,12 +47,6 @@ namespace WXSDKPerf
|
|||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
return;
|
return;
|
||||||
#else
|
#else
|
||||||
// Don't record annotation if we are not recording.
|
|
||||||
if (!IsRecording())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_PerfEngineImplementation == null)
|
if (m_PerfEngineImplementation == null)
|
||||||
{
|
{
|
||||||
UnityEngine.Debug.LogError("Annotation: Invalid m_PerfEngineImplementation! ");
|
UnityEngine.Debug.LogError("Annotation: Invalid m_PerfEngineImplementation! ");
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: cc37c7d5506b085a6df346222b3ab6a5
|
guid: 1cd547aa3fc25393740296f4789dcda6
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 0c6505cc99fc839915faa622b6cccaff
|
guid: badbb090376d9677f6c137f3e7ee688c
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 1d581d1e0029e9c614b8f8f213920d0f
|
guid: a4ea938685f7ac2a6e1c48908ef79694
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 5b031ecc782f78cea8e6989d68732cb3
|
guid: 6278072d3ac9cc1e8732023434d8837d
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: dfb0e4876224d2c4895c8b6ffc41692a
|
guid: 4b6f86fd26657c276cc63a310cd8e5ae
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 4e7005d801d03c8f40b7d03fef28dd0d
|
guid: 99c07dc175f036fe6c02d4338e4730c6
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 4aa5e2d6d65e5f123b7024edea08d90e
|
guid: 0c0785f490303b6bcf823f5584f82c11
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: a57a7e708b31462e3e96e159b74d9ece
|
guid: b3246569c26dfbcad41f509c1649e2bb
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 9bd4067b4928849450aa2497d81c8309
|
guid: c9c250b67952937bc72bd5ef6b2a1a73
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 7d5ede0f5069e1216243d748a6194706
|
guid: c414a3220a34c729d5a9b6543246da9c
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 947ff46b2e5c42f09121ffa5d91a4e2e
|
guid: c4c71fb31580367ab6a442b3bf87cf37
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 4c4cbd2db17f742dbf2e9906c198ee66
|
guid: c78e238d9d17d1dce7747a737406a63b
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: fffb1884d435f35f2fc4afb0dfa10f2e
|
guid: 83ea27abf6935850933a9c86b39031a1
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 670428b454eee42aa1a2342bbf5de8ba
|
guid: a91536024bd61a31c3265241b9bc40a4
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 8f7498abde47adda094eb2386319c3dd
|
guid: 2252d09fbfc761f49facfa6ec9dc712d
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 51a96b62dcb0e4c4b43c9954055a70e2
|
guid: 56fb129a0e863a83b453e6c74cd45295
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 8e8892d2d973cb9ebefed399f94de3cb
|
guid: c498469cc53f885d8169a4a671506ffa
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 2663cd8a6c36cde9bb045fe559937b69
|
guid: 3d1e0621b5b9e6e6a52592cb17d1754b
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 73d0c8e298e9d108b405aa58b57c1412
|
guid: d264c75ee57e832ff1b5400cb33a552e
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 0095cb4357181a5ad837e15f71abd3c5
|
guid: f3ca68f8f3ee6d1c6539a99ed4ded2f9
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: b7786cc94403abb4c77ca7d320d69ffd
|
guid: 35e7aecea1aef41185367d57bd6cb274
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 7752ac82de1afe56f9ad8c3f0f2054a1
|
guid: fa0c49df60ca52b00838da75d63faafa
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: accd3b9008ae1243954474f19fbdfaf4
|
guid: 69b8023bc31a71d1be0663a60767f6af
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: be375a525905238eb889806efaf8f39e
|
guid: 9463da33c11f5fd0d0b07563ce60e38f
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: b4a1ea7f75bb16d4ccd1552249c4d1df
|
guid: 57d7be555fec49db04e92202f7c7fa1f
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 0907eeaa24ac1ec755f57f396f70169f
|
guid: dacfa1cb7df1655e22b000270cf60ad5
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 2a0badeb444f3c1d1182f14b64fe3d96
|
guid: 8e530a81b0616df2a27e9c45560fa1a7
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: ba2d38ed253ad969c2e04e6c71aef526
|
guid: bb55e7afd4243d91f4921775568716ef
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 097d9da849631cad4a9289161caa8d8a
|
guid: befcc06e70991625735b52b418c86821
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: d8a04157a342f8f9bfb5b048cad64bae
|
guid: a6064cf540efbe0e9d49602a89a60127
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -113,7 +113,6 @@ GameGlobal.WebAssembly = GameGlobal.WXWebAssembly;
|
|||||||
GameGlobal.unityNamespace = GameGlobal.unityNamespace || unityNamespace;
|
GameGlobal.unityNamespace = GameGlobal.unityNamespace || unityNamespace;
|
||||||
GameGlobal.realtimeLogManager = wx.getRealtimeLogManager();
|
GameGlobal.realtimeLogManager = wx.getRealtimeLogManager();
|
||||||
GameGlobal.logmanager = wx.getLogManager({ level: 0 });
|
GameGlobal.logmanager = wx.getLogManager({ level: 0 });
|
||||||
GameGlobal.disableMultiTouch = $DISABLE_MULTI_TOUCH;
|
|
||||||
// 提前监听错误并打日志
|
// 提前监听错误并打日志
|
||||||
function bindGloblException() {
|
function bindGloblException() {
|
||||||
// 默认上报小游戏实时日志与用户反馈日志(所有error日志+小程序框架异常)
|
// 默认上报小游戏实时日志与用户反馈日志(所有error日志+小程序框架异常)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: da06eb2c03b61487943fec9ab1b2eae7
|
guid: b10311d39ea505b329a95ef720b33745
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 8ca80df7e7218f6fe39668ca89007cbb
|
guid: bdcfe72fad60da940ca7ae9df74e5071
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 71119a04b5075e9e086cb4d695cb5ebb
|
guid: 111d697e399650a9ee59087e70c05f22
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: a79b9b59ad70bb85fbb1627c98157b26
|
guid: 12760babd4bf4666a986e1699420e6f0
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: b766e2632c2efe53229999ec68fa3bf2
|
guid: a16b41206d0aa087b018c9950d29fec9
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 17390c8131f551bba6610e44abf3036c
|
guid: 807eeee18151d886bdff8c22e02a5bf5
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 1dda419766006d67219138804be03d41
|
guid: 20cee3b06b77faa188f01a3958d523ac
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: cb3eeaad97016020e38bc9f36ad197b1
|
guid: 2d8f76d446e23e799d66def426657767
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 6cd819420d3390c5cb16fa7f95b67946
|
guid: efc2272b06b1c4e6504ee71d7ec8a3d3
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import { debugLog } from '../utils';
|
|||||||
|
|
||||||
const defaultSoundLength = 441000;
|
const defaultSoundLength = 441000;
|
||||||
|
|
||||||
const needGetLength = true;
|
const needGetLength = false;
|
||||||
function jsAudioCreateUncompressedSoundClip(buffer, error, length) {
|
function jsAudioCreateUncompressedSoundClip(buffer, error, length) {
|
||||||
const soundClip = {
|
const soundClip = {
|
||||||
buffer,
|
buffer,
|
||||||
@ -70,25 +70,6 @@ function jsAudioCreateUncompressedSoundClipFromCompressedAudio(audioData, ptr, l
|
|||||||
});
|
});
|
||||||
return soundClip;
|
return soundClip;
|
||||||
}
|
}
|
||||||
function getSoundLength(getAudio, retryCount = 3) {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
const { duration } = getAudio;
|
|
||||||
if (duration > 0) {
|
|
||||||
resolve(duration);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (retryCount > 0) {
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
resolve(getSoundLength(getAudio, retryCount - 1));
|
|
||||||
}, 100);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
reject('getAudio.duration is 0');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function jsAudioCreateCompressedSoundClip(audioData, ptr, length) {
|
function jsAudioCreateCompressedSoundClip(audioData, ptr, length) {
|
||||||
const soundClip = {
|
const soundClip = {
|
||||||
error: false,
|
error: false,
|
||||||
@ -122,14 +103,12 @@ function jsAudioCreateCompressedSoundClip(audioData, ptr, length) {
|
|||||||
if (isSupportBufferURL) {
|
if (isSupportBufferURL) {
|
||||||
const url = wx.createBufferURL(audioData);
|
const url = wx.createBufferURL(audioData);
|
||||||
soundClip.url = url;
|
soundClip.url = url;
|
||||||
setSoundLength();
|
|
||||||
WEBAudio.audioBufferLength += length;
|
WEBAudio.audioBufferLength += length;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const tempFilePath = `${TEMP_DIR_PATH}/temp-audio${ptr + length}.mp3`;
|
const tempFilePath = `${TEMP_DIR_PATH}/temp-audio${ptr + length}.mp3`;
|
||||||
if (GameGlobal.manager.getCachePath(tempFilePath)) {
|
if (GameGlobal.manager.getCachePath(tempFilePath)) {
|
||||||
soundClip.url = tempFilePath;
|
soundClip.url = tempFilePath;
|
||||||
setSoundLength();
|
|
||||||
WEBAudio.audioBufferLength += length;
|
WEBAudio.audioBufferLength += length;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -137,7 +116,6 @@ function jsAudioCreateCompressedSoundClip(audioData, ptr, length) {
|
|||||||
.writeFile(tempFilePath, audioData)
|
.writeFile(tempFilePath, audioData)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
soundClip.url = tempFilePath;
|
soundClip.url = tempFilePath;
|
||||||
setSoundLength();
|
|
||||||
WEBAudio.audioBufferLength += length;
|
WEBAudio.audioBufferLength += length;
|
||||||
})
|
})
|
||||||
.catch((res) => {
|
.catch((res) => {
|
||||||
@ -146,24 +124,16 @@ function jsAudioCreateCompressedSoundClip(audioData, ptr, length) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function setSoundLength() {
|
if (needGetLength && soundClip.url) {
|
||||||
if (needGetLength && soundClip.url) {
|
const { audio: getAudio } = createInnerAudio();
|
||||||
const { audio: getAudio } = createInnerAudio();
|
getAudio.src = soundClip.url;
|
||||||
getAudio.src = soundClip.url;
|
getAudio.onCanplay(() => {
|
||||||
getAudio.onCanplay(() => {
|
soundClip.length = getAudio.duration * 44100;
|
||||||
getSoundLength(getAudio).then((duration) => {
|
setTimeout(() => {
|
||||||
soundClip.length = duration * 44100;
|
soundClip.length = getAudio.duration * 44100;
|
||||||
getAudio.destroy();
|
getAudio.destroy();
|
||||||
})
|
}, 0);
|
||||||
.catch((e) => {
|
});
|
||||||
if (soundClip.length === 0) {
|
|
||||||
soundClip.error = true;
|
|
||||||
printErrMsg(e);
|
|
||||||
}
|
|
||||||
getAudio.destroy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return soundClip;
|
return soundClip;
|
||||||
}
|
}
|
||||||
@ -249,7 +219,6 @@ export class AudioChannelInstance {
|
|||||||
this.source.mediaElement.volume = 0;
|
this.source.mediaElement.volume = 0;
|
||||||
}
|
}
|
||||||
this.source.mediaElement.onPlay(() => {
|
this.source.mediaElement.onPlay(() => {
|
||||||
debugLog('this.source.mediaElement.onPlay');
|
|
||||||
if (typeof this.source !== 'undefined') {
|
if (typeof this.source !== 'undefined') {
|
||||||
this.source.isPlaying = true;
|
this.source.isPlaying = true;
|
||||||
if (!this.source.loop && this.source.mediaElement) {
|
if (!this.source.loop && this.source.mediaElement) {
|
||||||
@ -271,7 +240,7 @@ export class AudioChannelInstance {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.source.mediaElement.onPause(() => {
|
this.source.mediaElement.onPause(() => {
|
||||||
debugLog('this.source.mediaElement.onPause');
|
debugLog('onPause');
|
||||||
if (typeof this.source !== 'undefined') {
|
if (typeof this.source !== 'undefined') {
|
||||||
this.source.isPlaying = false;
|
this.source.isPlaying = false;
|
||||||
if (this.source.stopTicker) {
|
if (this.source.stopTicker) {
|
||||||
@ -281,7 +250,7 @@ export class AudioChannelInstance {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.source.mediaElement.onStop(() => {
|
this.source.mediaElement.onStop(() => {
|
||||||
debugLog('this.source.mediaElement.onStop');
|
debugLog('onStop');
|
||||||
if (typeof this.source !== 'undefined') {
|
if (typeof this.source !== 'undefined') {
|
||||||
if (this.source.playAfterStop) {
|
if (this.source.playAfterStop) {
|
||||||
this.source._reset();
|
this.source._reset();
|
||||||
@ -298,7 +267,7 @@ export class AudioChannelInstance {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.source.mediaElement.onEnded(() => {
|
this.source.mediaElement.onEnded(() => {
|
||||||
debugLog('this.source.mediaElement.onEnded');
|
debugLog('onEnded');
|
||||||
if (typeof this.source !== 'undefined') {
|
if (typeof this.source !== 'undefined') {
|
||||||
this.source._reset();
|
this.source._reset();
|
||||||
this.disconnectSource();
|
this.disconnectSource();
|
||||||
@ -308,7 +277,7 @@ export class AudioChannelInstance {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.source.mediaElement.onError((e) => {
|
this.source.mediaElement.onError((e) => {
|
||||||
debugLog('this.source.mediaElement.onError', e);
|
debugLog('onError', e);
|
||||||
printErrMsg(e);
|
printErrMsg(e);
|
||||||
const { errMsg } = e;
|
const { errMsg } = e;
|
||||||
|
|
||||||
@ -322,17 +291,15 @@ export class AudioChannelInstance {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
const fn = () => {
|
const fn = () => {
|
||||||
debugLog('this.source.mediaElement.onCanplay');
|
|
||||||
if (typeof this.source !== 'undefined' && this.source.mediaElement) {
|
if (typeof this.source !== 'undefined' && this.source.mediaElement) {
|
||||||
getSoundLength(this.source.mediaElement).then((duration) => {
|
// @ts-ignore
|
||||||
soundClip.length = duration * 44100;
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
})
|
const { duration } = this.source.mediaElement;
|
||||||
.catch((e) => {
|
setTimeout(() => {
|
||||||
if (soundClip.length === 0) {
|
if (soundClip && this.source && this.source.mediaElement) {
|
||||||
soundClip.error = true;
|
soundClip.length = Math.round(Math.max(this.source.mediaElement.duration, 0) * 44100);
|
||||||
printErrMsg(e);
|
|
||||||
}
|
}
|
||||||
});
|
}, 0);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (!this.source.canPlayFnList) {
|
if (!this.source.canPlayFnList) {
|
||||||
@ -943,7 +910,7 @@ export default {
|
|||||||
if (isIOS175) {
|
if (isIOS175) {
|
||||||
WEBAudio.audioContext?.close();
|
WEBAudio.audioContext?.close();
|
||||||
WEBAudio.audioContext = wx.createWebAudioContext();
|
WEBAudio.audioContext = wx.createWebAudioContext();
|
||||||
Object.values(WEBAudio.audioInstances).forEach((it) => it.resetGain());
|
Object.values(WEBAudio.audioInstances).forEach(it => it.resetGain());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
WEBAudio.audioContext?.resume();
|
WEBAudio.audioContext?.resume();
|
||||||
@ -1159,7 +1126,6 @@ export default {
|
|||||||
if (WEBAudio.audioWebEnabled === 0) {
|
if (WEBAudio.audioWebEnabled === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
debugLog('_JS_Sound_SetPaused', channelInstance, paused);
|
|
||||||
const channel = WEBAudio.audioInstances[channelInstance];
|
const channel = WEBAudio.audioInstances[channelInstance];
|
||||||
if (!!paused !== channel.isPaused()) {
|
if (!!paused !== channel.isPaused()) {
|
||||||
if (paused) {
|
if (paused) {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: f65e6719bbf1a79f569dca5cf2299b96
|
guid: 2a11c6d0a7d33567e82e7d4dc56c1782
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 83ea95246b4a34f6d49b449998b32fce
|
guid: 8883fed896dd6e52959bbef2bb468a08
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: ad3283f50a4d5e70b6747bb5019782de
|
guid: a34c1347b5176a48cd3795ce594215f7
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 3f52df6608057cf7aa6a93f2e9001ce7
|
guid: 2c88c59f40c2d63022909bb1d971e297
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: dfc080ce256354f8366a0aeb42a48c2e
|
guid: 99f344dafd9294866aa2ec31240381f8
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 70618cf437cdecdc8980e89319d8d3f3
|
guid: 1423c95169f91cd6842c90d088994e74
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 2037d28ebba16820374ba6a40c1858f2
|
guid: 24cba1d6a9d8994f254ac56bfd93c643
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: e71b04341b5b2c08116e5227bde02ccf
|
guid: 2dbacaaa415fe0fa57a1812b25722eb5
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: e3f8770fd8cb23d485c84d63b2e4003b
|
guid: 84d0bcf060d7e2ef3fb9be3cb2a7d80f
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 7df6b4dbd22118920d9ecc1c616197b5
|
guid: c90253a8f31ff537674df51d9b6a0d30
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 524afce71a79938d4709341b761ffd48
|
guid: e3b5bdcca1d6239c9dbd9deb6c3cf280
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 856fb3e2282d080313cbfe4e6b417f55
|
guid: 25623d5bd38e8139ad6103adf4e1e99e
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 2a96d76916d429cf104cc2664a09c64a
|
guid: c8c7c72ee770f58144e21a596d9cc1e8
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 468c0ce3be26ae784ca796db1838e8e3
|
guid: 92547e564f87be9542466b6da4cd1b7d
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 28e9e0f00912938e462e65d369c09035
|
guid: 36bdbb73fc7de0fe8cdf335bec3f1ab6
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 1154c39f8d497da60511be50a37e7b71
|
guid: 6e98d0153913520227e1b35b859bf73a
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 44d2f50cec161b668c974f16ac9644c7
|
guid: 46d05ab7e883d0d6394a223d493fcc2d
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 67beeca9622d08e2cf4d06cde485dc0f
|
guid: 44f71d07a7107b13faea0cb48c568c22
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: cd03072d51b0a648a5d15248c75785a0
|
guid: 4629075627fa4e6b3dd433dd697cc488
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 5a51257b8600a38caa3c96860a7b4c05
|
guid: 7631e3853401b13434b43fd3054253cb
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 2464224126d2b028947d6e2738541bea
|
guid: 5dc458142024c1249b147b34b35b11a3
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 6f098aa16fe8c501e48f3b522380df1e
|
guid: aa671bc7d092d0c425c469becedba629
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 838e920a8b57e2bd06215103a7034da3
|
guid: a8ee49fc987b629de4035a49e05ab8d7
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: a03b4588b7f0a7348ee0d2e68ea7e6df
|
guid: 5d1c77147a596beaf4c8a27f73135397
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 6b5dee70678180bde43519658d9e2b28
|
guid: 1160f04ea652ecd72ad03e0223ed02da
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: ad706d4d17566ba00ea38d26cdc3b44c
|
guid: ff3a75990e784bdfca7ae683390b7311
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: dce75ff1b8a8e3d89c302bb0fa994d9a
|
guid: bf4f73b458ca757df419f55f516c58c5
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 1581db04b681c7aa23df4e44fe1eaaf6
|
guid: 8a7cadee6a96fac2464cfad4f23f913a
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 15615a6b0d57713ea06ad37c4d7398d0
|
guid: bede0c1349558660423b869b2c67be22
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 02652adbf286694cca9ea76551ebe4e3
|
guid: 6886c26403a99a3789b4ccbd17ae4524
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: a4efc86e69127646796b3ce94b26b7eb
|
guid: d3c5fdd1687f0f8f4e56b5a89511a0f1
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: c0cb6d9b4a953b5a16a603e4af5090d0
|
guid: 8c6d9db077a95ad7f7b83eb8ec5b953c
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 1b7c62cf49cca4894002340e64adb8e6
|
guid: aa1cf02b29cef5f760b3843d4602c1ac
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 25701fdeb1d9aa5a997212b45e6be999
|
guid: da795ee0a646df18b15671a470feab4f
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 03fb4392690093e3c0356b1da1f23958
|
guid: fc744aa33d5a5bcb796adc4ce8c7f1cd
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 52748a96f26147d47abec3e7f2ef1520
|
guid: 0395de8fd688d9b2f8272f7c20f88316
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 9cd3314178f847ce8f0d76e38b5d3aa5
|
guid: 364b09c1c7aaa75bb67921565676347e
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 84a01956240b13b423a61752cf01c282
|
guid: f48369bff633ce6fc8960c10d091c7fc
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 70bae897c4d2a685ab3e5bc9489d6c67
|
guid: bd772e2eee7723cdc1754387f4202de5
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 3fb8ae147eb8e81bbde1ca209f9c07d7
|
guid: 9e8fc947f7e2bb960b8830be7d4a4d60
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 638c95f4d2bf9fc508a5e543c7abff06
|
guid: 567c18f188f7901d893524d36f53456b
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user