MediaRecorder级开始稍微延迟后,录制音频音频、MediaRecorder

2023-09-04 07:44:50 作者:灭九族//

我有一个问题,MediaRecorder类。当我调用start()方法,录音机开始录音(音频),但一些延迟后(延迟是相当明显的 - 大约1秒)。我已经看到这种情况发生在Android 2.3设备,特别是三星Nexus S.这个问题不会出现在Android 1.6(G1)或任何版本的Andr​​oid模拟器。能否请您确认,如果您看到了这个问题,如果存在对相同的解决方案?这是一个文档错误?

I am having an issue with the MediaRecorder class. When I call the start() method, the recorder starts recording(audio) but after some delay (The delay is quite noticeable - approximately 1 second). I have seen this happening on Android 2.3 devices, specifically Samsung Nexus S. This issue does not appear on Android 1.6 (G1) or any version of Android emulators. Could you please confirm if you are seeing this issue and if there exists a solution for the same? Is this a documented bug?

推荐答案

这似乎是无论在任何MediaRecorder或设备的固件的bug。你可以看到相同的延迟在默认的摄像头应用程序,它也使用MediaRecorder。我还注意到,有在每一个记录,过去时录像停止录制结束额外的音频。然而,视频和音频似乎在整个视频被同步的。这件事情是这样的:

This seems to be either a bug in either MediaRecorder or the device's firmware. You can see the same delay in the default Camera app, which also uses MediaRecorder. I also noticed that there's extra audio at the end of each recording, past when the video stops recording. However, the video and audio seem to be synched throughout the video. It's something like this:

   =========================================     Audio being captured
=========================================        Video being captured
|----|----|----|----|----|----|----|----|----|   Time
^                                       ^
start()                               stop()

因此​​,音频是不是真的转向,它只是开始和结束过去的视频拍摄。

So the audio isn't really "shifted", it just begins and ends past the video capture.

我目睹摩托罗拉Xoom平板电脑运行的蜂窝的延迟(安卓3.0)。

I'm witnessing the delay on a Motorola Xoom tablet running Honeycomb (Android 3.0).

请参阅bug报告在这里:的http:// code.google.com / P /安卓/问题/详细信息?ID = 15953

See a bug report here: http://code.google.com/p/android/issues/detail?id=15953

 
精彩推荐
图片推荐