关于不同设备上的AMR音频文件播放问题 [英] About AMR audio file playing issue on different devices

查看:171
本文介绍了关于不同设备上的AMR音频文件播放问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我这里有一个很奇怪的问题。
我正在开发的IM软件,需要通过玩Android上另一个客户端录制的音频文件。
我有相同的音频文件可以使用AVAudioPlayer上3GS(IOS 4.2.1)设备和模拟器4.2播放。
但是,当我试图发挥它的iPhone4(iOS版4.3.3),功能玩总是返回NO。

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.

我也试过了两个iPhone设备,通过iPhone客户端录制的音频文件可以同时3GS和iPhone4播放。
所以我问了Android开发有关参数记录他们使用。他们说,他们采用的是AudioEn codeR是DEFAULT。也有一些其它参数如下:

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?

推荐答案

我已经解决了这个问题。

I've solved the issue.

以上的iOS4.3或更高版本中,AMR格式不再支持。如果你想播放或录制一个,你必须使用一些其他的工具(我用的OpenCore-AMR 库)来转换格式。

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.

这篇关于关于不同设备上的AMR音频文件播放问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆