简体   繁体   English

如何在实时代码生成的 android 应用程序中播放 wav 文件

[英]How to play a wav file in a livecode generated android application

A wav sound file imported as a control into a livecode application plays as expected in the Windows generated version of the program, but not in the android generated version on a nVidia tablet.作为控件导入 livecode 应用程序的 wav 声音文件在 Windows 生成的程序版本中按预期播放,但在 nVidia 平板电脑上的 android 生成版本中无法播放。 The wav file will play by itself when copied to the android tablet.复制到安卓平板电脑时,wav 文件会自行播放。

When you import a WAV file onto your card, an audioClip object is created.将 WAV 文件导入卡时,会创建一个 audioClip 对象。 The LiveCode Dictionary says this object type is supported only on Mac, Windows, and Linux, ie Desktop platforms. LiveCode Dictionary 说只有 Mac、Windows 和 Linux(即桌面平台)支持此对象类型。

On mobile platforms, you'd need to include the WAV files in the "Copy Files" section of the Application Standalone Settings, and you can play the WAV files in script using the mobilePlaySoundOnChannel command .在移动平台上,您需要在 Application Standalone Settings 的“Copy Files”部分中包含 WAV 文件,并且您可以使用mobilePlaySoundOnChannel 命令在脚本中播放 WAV 文件。

Please look up mobilePlaySoundOnChannel in the LiveCode Dictionary for more info.请查找mobilePlaySoundOnChannel在LiveCode字典以获得更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM