简体   繁体   English

在JME中播放mp3

[英]Play mp3 in JME

我想知道如何在程序中而不是从服务器而是从本地记忆棒文件中播放单个mp3文件,我想要一些明确的细节,如何在pc中为模拟器提供路径,以及如何在mobile中提供路径。

An example of how to play music files is found here using MMAPI (Mobile Media API). 使用MMAPI(移动媒体API) 在此处找到如何播放音乐文件的示例。 The trick is to get the input stream for the file. 诀窍是获取文件的输入流。 For that you will need to use the File Connection API, as described here . 对于您将需要使用的文件连接API,如所描述这里 The paths will vary, though, you'll have to figure out what's right for you. 路径会有所不同,但是,您必须找出最适合自己的方法。

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

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