概述
android audio 生产者与消费者 简介
全面接触生产者/消费者问题是在操作系统原理中,并发性原理讨论的问题 生产者/消费者问题。最近的工作偏向音频,接着上一篇文章,用生产者,消费者模型来理解Android音频。
In computing, the producer–consumer problem[1][2] (also known as the bounded-buffer problem) is a classic example of a multi-process synchronization problem. The problem describes two processes, the producer and the consumer, who share a common, fixed-size buffer used as a queue. The producer's job is to generate data, put it into the buffer, and start again. At the same time, the consumer is consuming the data (i.e., removing it from the buffer), one piece at a time. The problem is to make sure that the producer won't try to add data into the buffer if it's full and that the consumer won't try to remove data from an empty buffer.
生产者的主要作用是生成一定量的数据放到缓冲区中,然后重复此过程。与此同时,消费者也在缓冲区消耗这些数据。该问题的关键就是要保证生产者不会在缓冲区满时加入数据,消费者也不会在缓冲区中空时消耗数据。
Android中生产者与消费者
生产者与消费者模式 在Android普遍存在 这里以An
最后
以上就是明亮豆芽为你收集整理的Android常见音频通路(十四)的全部内容,希望文章能够帮你解决Android常见音频通路(十四)所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复