数据流:编解码 重采样 混音 过音效 AudioTrack::set、start、write Audioclient::prepareTracks_l、AudioFlinger::threadLoop 客户端 AudioTrack OpenSL ES AAudio MediaPlayer audioserver audiohal
AudioTrack::start/stop
AudioTrack::start/stop,开始/停止播放,主要是: start、startOutput、start_output_stream stop、stopOutput、stop_output_stream pause、flush、release AudioTrack::start startOutput AudioTrack::stop stopOutp...
AudioTrack::set
AudioTrack::set,AudioTrack的初始化,主要是: 采样率、声道数、flags和framecount等参数设置 创建track、createTrack_l,选择通路getOutputForAttr AudioTrack::set native层的set可以设置更多的参数,所以SoundPool、OpenSL ES和AAudio等直接跳过了Java层API...
What is a callback function?
什么是回调函数呢? what is a callback function? 回调函数,听名字很让人不解。回调函数是一个函数: 可以被另外的函数访问,以及 在第一个函数执行完成后被调用, 可以把回调函数理解为在caller(回调函数被当作参数传入的)的结尾被调用的函数。也可以叫做call after函数。 这个结构对异步操作非常有用,可以在前一个事件完成时触发一个活动。...
Why are public static final array a security hole?
Effective Java说: // Potential security hole! static public final Thing[] VALUES = {…}; public static final array 声明static final公共字段标志着类常量,非常适合原始数据类型(int、double等)和不可变类。 对于数组,问题在于即使数组引用是常量...
How to concatenate a string and an int?
对于Java和Python来说,操作符+就足够了,但是C++不支持直接拼接字符串和数字。 字符串拼接数字 按字母顺序, std::string name = "John"; int age = 21; std::string result; // 1. with Boost result = name + boost::lexical_cast<std::string>(...
Enable Google Page Views
This post is to enable Page Views on the Chirpy theme based blog that you just built. This requires technical knowledge and it’s recommended to keep the google_analytics.pv disabled unless you have...
Customize the Favicon
In Chirpy, the image files of Favicons are placed in assets/img/favicons/. You may need to replace them with your own. So let’s see how to customize these Favicons. With a square image (PNG, JPG o...
Getting Started
Prerequisites Follow the Jekyll Docs to complete the installation of Ruby, RubyGems, Jekyll and Bundler. Installation There are two ways to get the theme: Install from RubyGems - Easy to upd...
Writing a New Post
Naming and Path Create a new file named YYYY-MM-DD-TITLE.EXTENSION and put it in the _posts/ of the root directory. Please note that the EXTENSION must be one of md and markdown. Front Matter Ba...