当前位置:网站首页>音频控制常见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]);
}
边栏推荐
猜你喜欢
水调歌头·明月几时有
S32K148_ Can drive (bare metal development)
Acwing4405. 统计子矩阵
虞美人·寄公度
Mycat2 builds MySQL master-slave separation
Logical operator 1 (Gretel software - Jiuye training)
When will the moon appear
The difference and use between get request and post request
Detailed explanation of RAID disk array, raid classification, advantages and disadvantages
Experiment the next day
随机推荐
Editing skills
10 minutes to customize the pedestrian analysis system, detection and tracking, behavior recognition, human attributes all in one!
Array de duplication array sorting maximum sum class array conversion filter array
A skill; Teach you to easily download Tiktok live video, Tiktok live video download new scheme!
Differences between get requests and post requests and usage examples
Day 1 Experiment
Travail du quatrième jour
Is the career direction of test / development programmers over 35 a turning point in the workplace?
查看mysql数据表结构的两种方法你会吗?
Mysql database tables add fields, delete fields, modify the arrangement of fields and other operations, but not soon
Talk about the redis cache penetration scenario and the corresponding solutions
ATT&CK实战系列——红队实战(—)
SwiftUI 颜色教程大全之中创建自定义调色板
PostgreSQL function usage record
超声波传感器系列文章汇总
Pytorch version: yolov4 integrating attention and mobilenet
Thoughts on ahe investment
S32K148_CAN驱动(裸机开发)
Acwing4405. Statistical submatrix
全球金融危机来袭,如何科学理性投资?2020-03-17