mirror of
https://github.com/wechat-miniprogram/minigame-tuanjie-transform-sdk.git
synced 2025-11-12 19:25:55 +08:00
Auto-publish.
This commit is contained in:
parent
207766f6db
commit
fd910fa811
@ -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 = "202506121354"; // 这一行不要改他,导出的时候会自动替换
|
||||||
}
|
}
|
||||||
|
|
||||||
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: 239625e3ea95bc326bcea9d8891db406
|
||||||
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: 358fd09b412bc8f6c050f49196c944b2
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: f1ac621062d513597aaf96b982e6d32a
|
guid: 6e89cb0129f55f0234be150f3962358c
|
||||||
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: 8974de8ca4ac0563c15637f06afc1f63
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 0c6505cc99fc839915faa622b6cccaff
|
guid: 82277c7e25e5f29df22a818e6178da4a
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 1d581d1e0029e9c614b8f8f213920d0f
|
guid: 99250270cffb537bfa10ca69ce7fe2f8
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 5b031ecc782f78cea8e6989d68732cb3
|
guid: 68414e29b10360f9773fdcdf8138f6d9
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: dfb0e4876224d2c4895c8b6ffc41692a
|
guid: 6a8af5a39801464c358b373394290d52
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 4e7005d801d03c8f40b7d03fef28dd0d
|
guid: 9646f2cec54c200f75fd569a749fd310
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 4aa5e2d6d65e5f123b7024edea08d90e
|
guid: c671472b09193cdee9c9ba82430776f8
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: a57a7e708b31462e3e96e159b74d9ece
|
guid: 9d7d464a453af2cd9b500014837aeef9
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 9bd4067b4928849450aa2497d81c8309
|
guid: 5941247ee885ac7919ff751fda1cbbee
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 7d5ede0f5069e1216243d748a6194706
|
guid: 686b133bcab5d478beee2fdf00e080ee
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 947ff46b2e5c42f09121ffa5d91a4e2e
|
guid: ae70c84899b2a0013956b72d40c10891
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 4c4cbd2db17f742dbf2e9906c198ee66
|
guid: de34752d48f1ecd7a85aa40ee7990865
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: fffb1884d435f35f2fc4afb0dfa10f2e
|
guid: fca9c5d4f0d8490b07975147dee4598d
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 670428b454eee42aa1a2342bbf5de8ba
|
guid: 8114aaea0a4229c438a7043e3ea04fa1
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 8f7498abde47adda094eb2386319c3dd
|
guid: 805267a37ef491cbce950aaf226d5ddd
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 51a96b62dcb0e4c4b43c9954055a70e2
|
guid: a27d4d55c7d213238ebc941b02f59925
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 8e8892d2d973cb9ebefed399f94de3cb
|
guid: 226adf9c9bca58d8c62eee68d73afc15
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 2663cd8a6c36cde9bb045fe559937b69
|
guid: 390f5aedaf2439bbb1dccf77cc04027f
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 73d0c8e298e9d108b405aa58b57c1412
|
guid: 01d2cfc746bc94f03d76ec5d6b952f98
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 0095cb4357181a5ad837e15f71abd3c5
|
guid: 8cd883157574016f376103123abe6064
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: b7786cc94403abb4c77ca7d320d69ffd
|
guid: 07119095ce2ef768b102335ab458eb5d
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 7752ac82de1afe56f9ad8c3f0f2054a1
|
guid: db08af5593e3a21f94faa15aaca468d1
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: accd3b9008ae1243954474f19fbdfaf4
|
guid: 1febd3006dabcde3bf4e2109904b4958
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: be375a525905238eb889806efaf8f39e
|
guid: d5b747f8ea198d6af84559d85e755884
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: b4a1ea7f75bb16d4ccd1552249c4d1df
|
guid: 7d3e79018673543f4eef75fd9847bbd8
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 0907eeaa24ac1ec755f57f396f70169f
|
guid: 5b7eca110409f651f32fc682022bcb17
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 2a0badeb444f3c1d1182f14b64fe3d96
|
guid: 1d205f980ae83e7b89af639b5b6086c3
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: ba2d38ed253ad969c2e04e6c71aef526
|
guid: 220497c3149c1dc014e72ee4fc7eeeb6
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 097d9da849631cad4a9289161caa8d8a
|
guid: f5a47cde637b312c4e77d3bdcb2fd8a6
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: d8a04157a342f8f9bfb5b048cad64bae
|
guid: 3b65932938849cb650d2d202ebea8188
|
||||||
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: 48b4e4493fd2df69cfd80a76cba6615c
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 8ca80df7e7218f6fe39668ca89007cbb
|
guid: 60dee790bfd0e991709a9262fe537d2b
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 71119a04b5075e9e086cb4d695cb5ebb
|
guid: 75a4b6b3f3de7e56baebe2a70ba20c33
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: a79b9b59ad70bb85fbb1627c98157b26
|
guid: d1103d0dd169db689651c6aecffef741
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: b766e2632c2efe53229999ec68fa3bf2
|
guid: ad79a82868259fcf440a1bae12fbe530
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 17390c8131f551bba6610e44abf3036c
|
guid: abb338478ec9c339383897abbe1c62f9
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 1dda419766006d67219138804be03d41
|
guid: 53c3c063fea0aa9c3818e749b39b5d33
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: cb3eeaad97016020e38bc9f36ad197b1
|
guid: 8c335a633f9d5f835e6108386c317a1f
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 6cd819420d3390c5cb16fa7f95b67946
|
guid: 48cb05978168fff36ee49caa8565246f
|
||||||
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: 16c2c2bed7897b495b82f4e7e92433d2
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 83ea95246b4a34f6d49b449998b32fce
|
guid: 079d08371dd7c93260fc090e9a850741
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: ad3283f50a4d5e70b6747bb5019782de
|
guid: ca5ef16d86df1e1d89ab6bdb8422e67d
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 3f52df6608057cf7aa6a93f2e9001ce7
|
guid: db784d39a812cb9747bc03fbe611aa5f
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: dfc080ce256354f8366a0aeb42a48c2e
|
guid: afb46e1f84910bc812654bcdad2639c8
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 70618cf437cdecdc8980e89319d8d3f3
|
guid: 211973643399ac26dae5aa709a268090
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 2037d28ebba16820374ba6a40c1858f2
|
guid: bf55482bc12cf89890f99e7643cdbd59
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: e71b04341b5b2c08116e5227bde02ccf
|
guid: bf8aa98d0f5c6f5a01fe39c2d374e298
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: e3f8770fd8cb23d485c84d63b2e4003b
|
guid: e1aaba6b91287fe34bdc14d642e6934d
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 7df6b4dbd22118920d9ecc1c616197b5
|
guid: ca0700a9739869db2c03100f722f62d5
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 524afce71a79938d4709341b761ffd48
|
guid: 0c6695c3dcf12f150dcc03aaf4528e13
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 856fb3e2282d080313cbfe4e6b417f55
|
guid: 4e1d44799fc66d55d9243c5c07eee7e6
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 2a96d76916d429cf104cc2664a09c64a
|
guid: 79e25918992ccf022147d97696479b5c
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 468c0ce3be26ae784ca796db1838e8e3
|
guid: 08dd3aa15755104bdf679e43b72bf7d3
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 28e9e0f00912938e462e65d369c09035
|
guid: c6eaa80631d146626379dc4b1bdbe1eb
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 1154c39f8d497da60511be50a37e7b71
|
guid: 237626b8dee32c968560a139f74b989c
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 44d2f50cec161b668c974f16ac9644c7
|
guid: 0deb9b5fe7e0dfa6cd51d8aecacad335
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 67beeca9622d08e2cf4d06cde485dc0f
|
guid: edbb3f46f991fa73b07e85f97b723a36
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: cd03072d51b0a648a5d15248c75785a0
|
guid: 85d1fe32a65d9a7974b17b8a1db13210
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 5a51257b8600a38caa3c96860a7b4c05
|
guid: 0cb4e052fa0017cbcbbe6a0dfae6045a
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 2464224126d2b028947d6e2738541bea
|
guid: ad0952ad964766a91beca25b1dc20adf
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 6f098aa16fe8c501e48f3b522380df1e
|
guid: 8d3f969da9e654fe86158d8858912728
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 838e920a8b57e2bd06215103a7034da3
|
guid: c1546e41af51bbb30eacc7b226af18c8
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: a03b4588b7f0a7348ee0d2e68ea7e6df
|
guid: 85d39cd2fcf96e02f5be6ef75a347ab3
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 6b5dee70678180bde43519658d9e2b28
|
guid: f4ac78499cabdc0498dc915ec4503acd
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: ad706d4d17566ba00ea38d26cdc3b44c
|
guid: 42c20d827d9d054ba2a26fb58686932c
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: dce75ff1b8a8e3d89c302bb0fa994d9a
|
guid: 339448bdeced5ba1d1bc05714e001190
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 1581db04b681c7aa23df4e44fe1eaaf6
|
guid: 3afc2a9fa01d01f4f8f56e881bc2dd64
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 15615a6b0d57713ea06ad37c4d7398d0
|
guid: 0a0a4739a47659aa6e92b15212bca55c
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 02652adbf286694cca9ea76551ebe4e3
|
guid: ee099a69bd79a197550cbdc152006b2f
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: a4efc86e69127646796b3ce94b26b7eb
|
guid: ce54b7a64a5f562406a7f7f398e96e60
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: c0cb6d9b4a953b5a16a603e4af5090d0
|
guid: 950d39b0b02c7b35fa3e5051ddf07397
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 1b7c62cf49cca4894002340e64adb8e6
|
guid: ae78f77abb00bfcfcd179aaaeefb92df
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 25701fdeb1d9aa5a997212b45e6be999
|
guid: 12c4e51a02efe5ab4418ff2f6e63673c
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 03fb4392690093e3c0356b1da1f23958
|
guid: 63a75c1d996fc1235f3882bd8bb246b9
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 52748a96f26147d47abec3e7f2ef1520
|
guid: cf63b15eb20eaed78f3703658017c4f8
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 9cd3314178f847ce8f0d76e38b5d3aa5
|
guid: 1413dbeb8268549ddf44987e5371a779
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 84a01956240b13b423a61752cf01c282
|
guid: 205955517386175c269be1be92a656e2
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 70bae897c4d2a685ab3e5bc9489d6c67
|
guid: 8b4082077f81943fdc08b6ef76b0ad9c
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 3fb8ae147eb8e81bbde1ca209f9c07d7
|
guid: 13eb7958d5b678abaa5256c260dce355
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 638c95f4d2bf9fc508a5e543c7abff06
|
guid: 2a9b62668437bc5e3228e3bba72d415c
|
||||||
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