【发布时间】:2011-08-25 10:03:51
【问题描述】:
我正在使用以下代码在 j2me 中播放声音文件
try
{
String ctype_1 = "audio/x-wav";// #LINE 1
temp = Manager.createPlayer(this.getClass().getResourceAsStream(audioFileString),ctype_1 );
if(temp != null){
temp.setLoopCount(1);
temp.realize();
temp.prefetch() ;
return temp;
}
}
catch(Exception ex)
{
ex.printStackTrace();
System.out.println("MediaException in my sound ==>"+ex);
}
在评论 // #LINE 1 我们必须给出内容类型(在此类型是 .wav 文件)
我的问题是我应该为声音文件 .caf 扩展名提供什么内容类型。
【问题讨论】:
标签: audio java-me audioformat