【问题标题】:What content type should i use with .cfa sound file to play with j2me?我应该与 .cfa 声音文件一起使用什么内容类型来播放 j2me?
【发布时间】: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


    【解决方案1】:

    Java ME 不支持 AFAIK .cfa 文件。浏览这些文章,

    MMAPI for Java ME

    Finding audio format in Java ME

    【讨论】:

      猜你喜欢
      • 2012-11-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-07
      • 1970-01-01
      • 2022-01-20
      • 2013-07-29
      相关资源
      最近更新 更多