- 博客(22)
- 收藏
- 关注
转载 framework之Audio系统
Frame 帧数,1单位的Frame等于一个采样点的字数*声道数(r如PCM16,双声道的1个Frame为2*2=4字节),一般音频系统都是用它为单位来分配和管理的AudioTrack:AudioManager.STREAM_MUSIC 音频流的类型8000采样频率,每秒8000个点AudioFormat.CHANNEL_CONFIGUATION_STEREO 双声
2016-06-27 17:12:00 585
转载 MemoryHeapBase与MemoryBase
MemoryHeapBaseMemroyHeapBase也是Android搞的一套基于Binder机制的对内存操作的类。既然是Binder机制,那么肯定有一个服务端(Bnxxx),一个代理端Bpxxx。看看MemoryHeapBase定义:class MemoryHeapBase : public virtual BnMemoryHeap{ 果然,从BnMemor
2016-06-27 16:57:39 794
转载 a2dp场景分析
简述这次,我们来看下a2dp下面的播放场景吧。a2dp是蓝牙用来播放音乐的协议,正常情况下,播放音乐只从蓝牙耳机端输出,但是如果是来个通知类的声音,那策略的选择会同时从蓝牙耳机和speaker同时输出,由于speaker和蓝牙是采用的不同硬件设备输出,所以它在hal层应该是对应两个so的。所以,谷歌针对这种场景,继承PlaybackThread,实现了DuplicatingThread,这
2016-06-16 15:59:34 5776
转载 音频界的瑞士军刀 --- SoX - Sound eXchange 国外开源音频处理软件介绍
今天我给大家介绍一款自称是音频处理界的瑞士军刀的一款开源软件,SoX - Sound eXchange。引用主页上介绍的原话: Welcome to the home of SoX, the Swiss Army knife of sound processing programs.该软件的主页是http://sox.sourceforge.net/,文章介绍不详细的
2016-06-15 09:53:53 7294
转载 调用操作符的重载与函数对象
一:调用操作符重载:我们可以为类类型的对象重载调用操作符即小括弧”()“,定义了调用操作符的类,在使用定义的调用操作符时,行为就像是调用函数,所以这种对象称为函数对象,即行为类似函数的对象:如下例子为类A定义了调用操作符,功能是返回一个绝对值:class A{ public: int operator() (int val) {
2016-06-14 15:57:46 495
转载 C++ STL 学习 :更多仿函数(functor)(二)
By zieckey( All right reserved!)C++ STL 学习 :更多仿函数(functor)(二)C++标准程序库中提供了许多非常有用的预先定义好的的仿函数,了解这些将为我们的开发工作带来便利性和稳健性。求反值:// TEMPLATE STRUCT negatetemplateclass _Ty> struc
2016-06-14 15:41:35 515
转载 C++ STL 学习 :for_each与仿函数(functor)(一)
C++ STL 学习 :for_each与仿函数(functor)(一)By zieckey( All right reserved!)先看wikipedia定义:A function object, also called a functor, functional, or functionoid,[1] is a computer programming cons
2016-06-14 15:39:01 447
原创 AudioPolicyManager::getDeviceForStrategy
getStrategy根据StreamType得到Strategy,AudioPolicyManager再从mOutputRoutes里查出Strategy和前面得到的Strategy相等的Route里面的Device从以上可以看出, Strategy可以定义为:Group of stream types with the similar behavior。当然从getStrategyForS
2016-06-14 09:48:16 3338
原创 C++初始化列表中无默认构造函数的成员的初始化
在初始化列表中,如果我们有一个类成员,它本身是一个类或者是一个结构,而且这个成员它只有一个带参数的构造函数,而没有默认构造函数,这时要对这个类成员进行初始化,就必须调用这个类成员的带参数的构造函数。Android代码中的例子: 249 InputReader::InputReader(const sp& eventHub, 250 const sp& policy, 2
2016-06-07 17:48:21 2244
转载 SurfaceFlinger and HWComposer
IntroductionIn the beginning, people believes that GPU composition is fast and power effiecent compared with CPU composition. Then, people find that in most usage scenarios, GPU can be kept sleep
2016-06-02 18:27:07 1493
转载 android/DisplayHotplug
This feature is implemented as part of android version 4.2.1 and onward. The implementation is given as part of android's Surfaceflinger and HWComposer.The call flow chart of Surfaceflinger is giv
2016-06-02 18:25:06 642
转载 The Biggest Changes in C++11 (and Why You Should Care)
It’s been 13 years since the first iteration of the C++ language. Danny Kalev, a former member of the C++ standards committee, explains how the programming language has been improved and how it can he
2016-06-01 14:45:38 595
转载 UNDERSTANDING ANDROID GRAPHICS INTERNALS – GRAPHICS BASICS(II)
After the preceding post on ANativeWindow and ANativeWindowBuffer, we have the fodder to discuss GraphicBuffer and Surface.After the preceding posts on ANativeWindow and ANativeWindowBuffer, we ha
2016-06-01 11:52:32 460
转载 UNDERSTANDING ANDROID GRAPHICS INTERNALS – GRAPHICS BASICS (I)
In this post, it is presumed that you know about frame buffer driver, display control, display overlay, frame buffer, frame rate, common color space schemes, graphics pipeline ,EGL, Direct Rendering I
2016-06-01 11:51:50 443
转载 UNDERSTANDING ANDROID GRAPHICS INTERNALS – THE GRAPHIC SURFACE SERVICE INTERFACES
As pointed out in previous posts, Android does not allow UI applications to write to the frame buffer directly; SurfaceFlinger administrates the allocation of surfaces/graphic buffers to UI applicatio
2016-06-01 11:49:10 486
转载 UNDERSTANDING ANDROID GRAPHICS INTERNALS – GRAPHIC BUFFER HANDLING INTERFACES
In this post, we touch IGraphicBufferProducer, IGraphicBufferAlloc.IGraphicBufferProducerDefined in include/gui/IGraphicBufferProducer.h, it was formerly known as ISurfaceTexture. It is the
2016-06-01 11:48:20 435
转载 UNDERSTANDING ANDROID GRAPHICS INTERNALS – GRALLOC AND HWCOMPOSER
gralloc and hwcomposer are hardware abstraction modules compliant to hw_module_t (defined in hardware/libhardware/include/hardware/hardware.h). Vendors mostly overwrite the android release implementat
2016-06-01 11:47:43 547
转载 UNDERSTANDING ANDROID GRAPHICS INTERNALS – SURFACEFLINGER (III)
In this post, we discuss BufferQueue, BufferQueue::BufferSlotand BufferQueue::BufferState defined in frameworks/native/include/gui/BufferQueue.h.BufferQueueWe have learned the concepts of
2016-06-01 11:46:19 607
转载 UNDERSTANDING ANDROID GRAPHIC- SURFACEFLINGER (IV)
Having known that BufferQueue exposes the APIs for consuming surface frame while implementing BnGraphicBufferProducer, we continue our attempt to demystify surface compositions and rendering with an
2016-06-01 11:45:28 308
转载 UNDERSTANDING ANDROID GRAPHICS INTERNALS – SURFACEFLINGER (II)
Prior to Jelly Bean, the threadLoop in SurfaceFlinger.cpp processes composition and rendering sequentially in a thread loop. Newly enqueued graphic buffer won’t be handled until the rendering of cur
2016-06-01 11:43:08 333
转载 UNDERSTANDING ANDROID GRAPHICS INTERNALS – SURFACEFLINGER (I)
from: https://charleszblog.wordpress.com/2014/02/22/understanding-android-internals-surfaceflinger-i/Let’s recapture what we have known of SurfaceFlinger from previous posts on Android Graphics.
2016-06-01 11:41:47 843
转载 UNDERSTANDING ANDROID GRAPHICS INTERNALS -SURFACEFLINGER(V)
from: https://charleszblog.wordpress.com/category/android-2/graphics-android/This SurfaceFlinger series turns lengthy. Let’s see if we can wrap it up in this post.FramebufferSurface and Disp
2016-06-01 11:40:48 534
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人