AudioRecord obtainBuffer定时出与AudioRecorder.startRecording() [英] AudioRecord obtainBuffer Timed out with AudioRecorder.startRecording()

查看:749
本文介绍了AudioRecord obtainBuffer定时出与AudioRecorder.startRecording()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的计划,记录麦克风有问题。有时,当我运行它,我有以下警告,并没有健全的实际记录:

I have a problem with my program which records the microphone. Sometimes when I run it I have the following warnings and no sound is actually recorded:

11月12日至14日:17:50.660:W / AudioRecord(1857):obtainBuffer超时(?在CPU挂)用户= 00000000,服务器= 00000000

从我发现,其他有这个问题, AudioTrack 作为解释的这里这里。但是,对我来说是 AudioRecord 这是不正常。据我所知,缓冲区不能不管出于什么原因产生。该警告开始时,我开始在录制过程如下: recorder.startRecording();

From what I have found, other have this problem with AudioTrack as explained here and here. However, for me it is AudioRecord which is not working properly. I understand that the buffer cannot be created for whatever reason. The warning start to appear when I start the recording process: recorder.startRecording();

此问题有时会发生当我使用内置麦克风输入,却往往当蓝牙耳机用作输入。这里是我的code使用蓝牙麦克风输入:

This problem happens sometimes when I use the built-in microphone as input, but often when the Bluetooth headset is used as input. Here is my code to use the Bluetooth microphone as input:

audioManage = (AudioManager)this.getSystemService(Context.AUDIO_SERVICE);

if (!audioManage.isBluetoothScoOn()) {
    audioManage.setBluetoothScoOn(true);
    audioManage.startBluetoothSco();
    audioStreaming = new AudioStreaming();
} else {
    audioManage.startBluetoothSco();
    audioStreaming = new AudioStreaming();
}

我如何可以强制缓冲创造?

How can I force the buffer creation?

信息:我使用的是Android 3.0的,我已经测试了一个Xoom的平板电脑方案

INFO: I'm using Android 3.0 and I've tested the program on a Xoom tablet.

编辑:

我才意识到,我已经得到这个错误太:

I just realised that I've got this error too:

12月12日至一十四日:13:12.500:E / AudioPostProcessor(2541):错误从音频阅读:连接超时

仅当程序不与蓝牙工作。而且我还没有发现关于这个问题的任何东西......

Only when the program is not working with the Bluetooth. And I haven't found anything on the subject...

推荐答案

呜呜,溶液很简单......我只是没有如果哪里有合适的......问题已被固定在其上新的更新自己,然后检查。

Hum, the solution was quite simple... I just didn't checked if new updates where available... Problem has been fixed on it own then.

这篇关于AudioRecord obtainBuffer定时出与AudioRecorder.startRecording()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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