1
votes

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?

1
The Android guys tried the other 4 parameters and also can't play on IOS4.3.3 device. I don't think it's the device matter but the different version of IOS.LeverkusenFan
I've installed XCode4 and run my app on simulator 4.3, it can't play the audio too. So it's definitely OS version issue. But I still get no solution:(LeverkusenFan
Already reported a bug to Apple about it.LeverkusenFan

1 Answers

2
votes

I've solved the issue.

Over iOS4.3 or later, the AMR format is no longer supported. If you want to play or record one, you have to use some other tools(which I use opencore-amr library) to transform the format.