KT24-1110_65E-HA-651B/include_lib/media/multi_ch_mix.h
2024-11-10 18:44:17 +08:00

34 lines
1.5 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef _MULTI_CH_MIX_H
#define _MULTI_CH_MIX_H
typedef struct _MixParam {
void *data; //每路数据
float gain; //增益
} MixParam;
void Mix16to16(MixParam *mix1, MixParam *mix2, MixParam *mix3, short *out, int channel, int way_num, int per_channel_npoint);
//功能输入数据16bit mix ,输出数据16bit
//way_num 为2或者3 way_num = 2 取 mix1 mix2的数据mix3无效
//out 数据输出 带16bit饱和
//per_channel_npoint 每个通道的样点数
void Mix32to32(MixParam *mix1, MixParam *mix2, MixParam *mix3, int *out, int channel, int way_num, int per_channel_npoint);
//功能: 输入数据32bit mix ,输出数据32bit
//way_num 为2或者3 way_num = 2 取 mix1 mix2的数据mix3无效
//out 数据输出 不带16bit饱和
//per_channel_npoint 每个通道的样点数
void Mix32to16(MixParam *mix1, MixParam *mix2, MixParam *mix3, short *out, int channel, int way_num, int per_channel_npoint);
//功能: 输入数据32bit mix ,输出数据16bit
//way_num 为2或者3 way_num = 2 取 mix1 mix2的数据mix3无效
//out 数据输出 带16bit饱和
//per_channel_npoint 每个通道的样点数
void Mix16to32(MixParam *mix1, MixParam *mix2, MixParam *mix3, int *out, int channel, int way_num, int per_channel_npoint);
//功能: 输入数据16bit mix ,输出数据32bit
//way_num 为2或者3 way_num = 2 取 mix1 mix2的数据mix3无效
//out 数据输出 不带16bit饱和
//per_channel_npoint 每个通道的样点数
#endif