https://stackoverflow.com/questions/5293025/audiotrack-lag-obtainbuffer-timed-out [典]

03-13 14:55:57.100: WARN/AudioTrack(3454): obtainBuffer timed out (is the CPU pegged?) 0x2e9348 user=00000960,     server=00000000
03-13 14:55:57.340: WARN/AudioFlinger(72): write blocked for 233 msecs, 9 delayed writes, thread 0xba28

I ran into a similar problem, although I was using a RandomAccessFile, instead of a BufferedInputStream, to read the PCM data. The issue was that the file I/O was too slow. I suspect you will have this problem even with a buffered stream, because the I/O is still taking place on the same thread as audio processing.

The solution is to have two threads: A thread that reads buffers from a file and queues them into memory, and another thread that reads from this queue and writes to the audio hardware. I used a ConcurrentLinkedQueue to accomplish this.

I used the same technique for recording, using AudioRecord, but in the reverse direction. The key is to place the file I/O on a separate thread.

https://stackoverflow.com/questions/7398392/android-audiotrack-only-plays-first-2-seconds-back-then-stops

- ::24.816: WARN/Archive(): audiostate is:
- ::26.089: WARN/AudioTrack(): obtainBuffer() track 0x298b18 disabled, restarting
- ::27.214: WARN/AudioTrack(): obtainBuffer() track 0x298b18 disabled, restarting
- ::28.332: WARN/AudioTrack(): obtainBuffer() track 0x298b18 disabled, restarting
- ::29.457: WARN/AudioTrack(): obtainBuffer() track 0x298b18 disabled, restarting

I just saw the logcat: obtainBuffer() track 0x298b18 disabled, restarting .. that is to say : you have not got audio data and the input audio stream have been stopped .so the buffer must wait for the audio stream in. i think you should check the inputstream and the read method. you must ensure that you have read the audio data continuously.

https://stackoverflow.com/questions/24378916/obtainbuffer-timed-out-is-the-cpu-pegged

obtainBuffer timed out (is the CPU pegged?)

https://www.oschina.net/question/1273322_128331

媒体资源没有释放 E AudioMixer: AudioMixer::getTrackName out of available tracks

检查下代码 临时的播放资源需要及时释放

https://bbs.csdn.net/topics/390134512

https://blog.csdn.net/bberdong/article/details/52161426

obtainBuffer timed out (is the CPU pegged?)的更多相关文章

  1. 解决"waitForCondition(LockCondition) timed out (identity=23, status=0). CPU may be pegged. trying again."问题

    前几天在跑游戏引擎的时候,遇到了一个比较奇怪的问题,logcat不断地打印下面的错误: waitForCondition(LockCondition) timed out (identity=23, ...

  2. python小demo-01: 线程池+多进程实现cpu密集型操作

    起因: 公司有一个小项目,大概逻辑如下: 服务器A会不断向队列中push消息,消息主要内容是视频的地址,服务器B则需要不断从队列中pop消息,然后将该视频进行剪辑最终将剪辑后的视频保存到云服务器.个人 ...

  3. Error: timed out while waiting for target halted

    /************************************************************************************ * Error: timed ...

  4. 记录一次服务器CPU 100%的解决过程

    昨天客户反馈业务系统很慢,而且偶尔报错. 查看nginx日志: [root@s2 nginx]# tail log/error.log 2017/03/14 12:54:46 [error] 1704 ...

  5. HBase Thrift2 CPU过高问题分析

    目录 目录 1 1. 现象描述 1 2. 问题定位 2 3. 解决方案 5 4. 相关代码 5 1. 现象描述 外界连接9090端口均超时,但telnet端口总是成功.使用top命令观察,发现单个线程 ...

  6. 关于sys CPU usage 100%问题的分析

    最近一个客户抱怨他的核心EBS数据库出现性能问题.这是一个10.2.0.3的数据库,运行在Red Hat Enterprise Linux Server release 5.5 (Linux x86- ...

  7. Linux下分析某个进程CPU占用率高的原因

      Linux下分析某个进程CPU占用率高的原因 通过top命令找出消耗资源高的线程id,利用strace命令查看该线程所有系统调用  1.top 查到占用cpu高的进程pid 2.查看该pid的线程 ...

  8. 2018最新win10 安装tensorflow1.4(GPU/CPU)+cuda8.0+cudnn8.0-v6 + keras 安装CUDA失败 导入tensorflow失败报错问题解决

    原文作者:aircraft 原文链接:https://www.cnblogs.com/DOMLX/p/9747019.html 基本开发环境搭建 1. Microsoft Windows 版本 关于W ...

  9. CPU运行时间——time

    用途说明time命令常用于测量一个命令的运行时间,注意不是用来显示和修改系统时间的(这是date命令干的事情).但是今天我通过查看time命令的手册页,发现它能做的不仅仅是测量运行时间,还可以测量内存 ...

随机推荐

  1. 深入理解ByteBuffer

    ByteBuffer类是在Java NIO中常常使用的一个缓冲区类,使用它可以进行高效的IO操作,但是,如果对常用方法的理解有错误,那么就会出现意想不到的bug. ByteBuffer类的常用方法 先 ...

  2. UNION WHERE

    w条件语句的作用域. SELECT * FROM ( SELECT asin, LOWER(country) AS country FROM grab_amzreviews_asins UNION D ...

  3. Python并行编程(七):线程同步之事件

    1.基本概念 事件是线程之间用于通讯的对象.有的线程等待信号,有的线程发出信号.基本上事件对象都会维护一个内部变量,可以通过set方法设置为true,也可以通过clear方法设置为false.wait ...

  4. Flask路由系统与模板系统

    路由系统 @app.route('/user/<username>') @app.route('/post/<int:post_id>') @app.route('/post/ ...

  5. redis实现自动输入完成(八)

    1. 介绍 当我们在京东商城的搜索框,输入想要搜索的内容,比如你想要搜索"热水瓶",刚输入一个"热"字,就会出现一个下拉框,列出了很多以"热" ...

  6. Curl https 访问

    如果访问https的网页,出现: curl: (60) SSL certificate problem: unable to get local issuer certificate 将 将 CURL ...

  7. YYModel源代码阅读--基础知识

    这段时间因为工作需要,阅读了YYModel这个开源框架,至于它能做什么,最直白的讲述就是JSON与Model之间的相互转化. 源代码在Github,大家可以自行git clone或者download. ...

  8. JS:parseInt("08")或parseInt("09")转换返回0的原因

    一.parseInt用法 parseInt(s); parseInt(s,radix) 二.第一个方式不再多说,第二个方式,radix是s所基于的进制.范围为2-36(不在此范围函数将返回NaN). ...

  9. hihocoder1479 三等分

    地址:http://hihocoder.com/problemset/problem/1479 题目: 三等分 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi最近 ...

  10. JMS API(二)

    JMS 公共API 接口共7个: 1.ConnectionFactory 2.Destination 3.Connection 4.Session 5.Message 6.MessageProduce ...