音频处理中的循环缓冲区
ring buffer
page 184
输入单元和输出单元是不同的 I / O ,
the input unit 和 the output unit 独立启动,独立运行
输出单元 the output unit 不能直接从输入单元 the input unit 拉数据,
the input unit 和 the output unit,跑在不同的 timing cycle.
在给定的时刻,the input unit 不保证能提供采样数据
the input unit ,只有在状况良好、准备充分的条件下,才提供音频采样数据
![f101861d2131a6f81309e3ab81ac4884.png](https://i-blog.csdnimg.cn/blog_migrate/0f868b607b2fc04d6bbcb99b78f353b1.jpeg)
ring buffer 简单理解,就是两个指针
一个读指针,
一个写指针
- 初始化,没有数据,可以写,不能读,
所以没有读指针,只有写指针
- 读指针是消费数据,写指针是生产数据
读指针必须在写指针前面
- 一直写入,不读取,就会丢失数据
但是对内存友好
采样输入单元,( 包含录音 ) &#x