About AMR audio file playing issue on different devices

Posted by user352537 on Stack Overflow See other posts from Stack Overflow or by user352537
Published on 2011-07-20T07:03:14Z Indexed on 2012/10/29 11:02 UTC
Read the original article Hit count: 280

Filed under:
|
|

I have got a quite strange problem here. I am developing an IM software and need to play audio files recorded by another client on Android. The same audio file I've got can be played with AVAudioPlayer on 3GS(IOS 4.2.1) device and simulator 4.2. But when I tried by play it on iPhone4(iOS 4.3.3), the function "play" always return NO.

I also tried with two iPhone devices, the audio files recorded by iPhone client can be played on both 3GS and iPhone4. So I asked the Android developers about the record parameters they've used. They said that the "AudioEncoder" used by them was "DEFAULT". There are also some other parameters as following:

**private AudioEncoder() {}
        public static final int DEFAULT = 0;
        /** AMR (Narrowband) audio codec */
        public static final int AMR_NB = 1;
        /** @hide AMR (Wideband) audio codec */
        public static final int AMR_WB = 2;
        /** @hide AAC audio codec */
        public static final int AAC = 3;
        /** @hide enhanced AAC audio codec */
        public static final int AAC_PLUS = 4;
        /** @hide enhanced AAC plus audio codec */
        public static final int EAAC_PLUS = 5;**

Does anybody know what's the matter?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about audio