当前位置:网站首页>Common bug precautions of audio control
Common bug precautions of audio control
2022-07-19 12:52:00 【ToneChip】
The platform code described in this article Only for a specific platform code , It's not universal
1. eliminate ring buf When caching if Judge
if(ring_buffer_get_fill_size(&audio_dac_ring_buffer))
ring_buffer_clear(&audio_dac_ring_buffer);
2.16bit Data mixing
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 Data mixing
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]);
}边栏推荐
- HICP day 3
- Pytorch version: yolov4 integrating attention and mobilenet
- Can you view MySQL data table structure in two ways?
- 面试难题:分布式 Session 实现难点,这篇就够!
- Investment logic in market "uncertainty" 2020-03-18
- 全球金融危机来袭,如何科学理性投资?2020-03-17
- Ah Qu's thinking
- Mysql database tables add fields, delete fields, modify the arrangement of fields and other operations, but not soon
- R language -- principle of Cox model calibration curve (I) data source
- 超声波传感器(CHx01) 学习笔记 Ⅲ - I2C读写操作
猜你喜欢

懒到骨子里了,我在CSDN写文章都懒得自己写了,基于selenium模拟写文章

Travail du quatrième jour

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

Lazy to the bone, I am too lazy to write articles in CSDN. I write articles based on selenium simulation

关于“抄底”心态,让你筋疲力尽 2020-03-15

超声波传感器(CH101&ch201) - Ⅰ

ros(26):ros::Time::now(),ros::Duration,toSec(),toNSec(); Calculate program execution time

Which domestic API tool is better? It turned out to be it

Learning record: call TFTLCD

Li Hongyi machine learning 1 Introduction of this course
随机推荐
Day 4 homework
[C language programming 8] branch predictor
2022 safety officer-c certificate title and answer
2022年最新吉林建筑安全员模拟题库及答案
Logical operator 1 (Gretel software - Jiuye training)
第四天作業
懒到骨子里了,我在CSDN写文章都懒得自己写了,基于selenium模拟写文章
The active and standby cache of redis cluster is full, causing frequent active and standby switchover
又错了,字节对齐及#pragma pack的使用
2022 low voltage electrician examination questions and online simulation examination
面试难题:分布式 Session 实现难点,这篇就够!
Mycat2 builds MySQL master-slave separation
全球金融危机来袭,如何科学理性投资?2020-03-17
LeetCode_前缀和_中等_523.连续的子数组和
The leader of the new generation of cloud database -- AWS
Yunxi and Tencent cloud have reached a strategic cooperation to accelerate the expansion of the global live broadcast market
10分钟自定义搭建行人分析系统,检测跟踪、行为识别、人体属性All-in-One!
回顾2008年金融危机,做长期主义投资者 2020-03-19
2022 global developer salary exposure: China ranks 19th, with an average annual salary of $23790
PostgreSQL 函数使用记录