开发者

What content type should i use with .cfa sound file to play with j2me?

开发者 https://www.devze.com 2023-03-30 11:10 出处:网络
I m using the following code for play a sound file in j2me try { String ctype_1 = \"audio/x-wav\";// #LINE 1

I m using the following code for play a sound file in 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(Exceptio开发者_运维问答n ex)
    {
        ex.printStackTrace();
        System.out.println("MediaException in my sound ==>"+ex);
    }

at comment // #LINE 1 we have to give the content type (in this the type is for .wav file)

My question is that what content type i should give for the sound file .caf extension.


AFAIK .cfa file isn't supported by Java ME. Go through these articles,

MMAPI for Java ME

Finding audio format in Java ME

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号