当前位置:网站首页>音频控制常见BUG注意事项
音频控制常见BUG注意事项
2022-07-17 16:56:00 【ToneChip】
这篇文章所描述的平台代码 仅针对某一个特定平台代码,并不通用
1.清除ring buf缓存的时候需要if判断一下
if(ring_buffer_get_fill_size(&audio_dac_ring_buffer))
ring_buffer_clear(&audio_dac_ring_buffer);
2.16bit数据混音
void linein_mic_mix(short *in_mic, short *in_linein, short *mic_out)
{
int i = 0, x = 0;
for(i = 0; i < 256 * 2;)
{
x = (in_mic[i] + in_linein[i]);
// mic_out[i] = WORD2INT(x);
mic_out[i] = _lim(sat16, x);
i++;
}
}3. 24bit数据混音
int32_t flash_read_dubbingData[LEADELITY_NN * 2] = {0}; //dubbing is stero
int32_t src[256 * 2] = {0};
for(i = 0; i < 256 * 2; i++)
{
src[i] = _lim(sat24, src[i] + flash_read_dubbingData[i]);
}边栏推荐
- SwiftUI 颜色教程大全之中创建自定义调色板
- 备赛笔记:matplotlib学习笔记a
- 关于“抄底”心态,让你筋疲力尽 2020-03-15
- Solution: function RGB is missing argument $green Problems of
- hicp第三天
- LeetCode_ Prefix and_ Medium_ 523. Continuous subarrays and
- What is the relationship between softmax and cross enterprise?
- 我最喜欢的10个机器学习公众号
- 减半行情会不会来?有何投资机会?2020-03-11
- Yunxi and Tencent cloud have reached a strategic cooperation to accelerate the expansion of the global live broadcast market
猜你喜欢

Att & CK actual combat series - red team actual combat (-)

云犀聚焦店播解决方案,加速全球化布局

结构体内存对齐、位段、联合

Go unit test

减半行情会不会来?有何投资机会?2020-03-11

ATT&CK实战系列——红队实战(—)

Learning record: call TFTLCD

Detailed explanation of RAID disk array, raid classification, advantages and disadvantages

Talk about the redis cache penetration scenario and the corresponding solutions

S32K148_CAN驱动(裸机开发)
随机推荐
Review the 2008 financial crisis and become a long-term investor 2020-03-19
MyCat2搭建mysql主从分离
第一天实验
深度学习参数初始化(二)Kaiming初始化 含代码
PostgreSQL 函数使用记录
Three minutes to understand the primary key, foreign key, non empty, unique and default constraints in mysql, and how to create a table
hcip第四天笔记
Hcip fourth day notes
WebGPU 会成为 WebGL 的杀手吗?
Day 1 Experiment
Notes on the fifth day
When will the deflationary market reverse? How should we operate? 2020-03-13
How to invest scientifically and rationally when the global financial crisis strikes? 2020-03-17
第四天作業
OpenCV基于DLCO描述子匹配
2022 low voltage electrician examination questions and online simulation examination
Machine learning (I) Wu enda
Mysql的知识梳理
SwiftUI Swift 中的数据持久性,保存数据的不同方法
go web