This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CCS/TMS320C5515:CCS/TMS320C5515:音频效果

Guru**** 2193075 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/839059/ccs-tms320c5515-ccs-tms320c5515-audio-effect

器件型号:TMS320C5515

工具/软件:Code Composer Studio

我正在为"多频带压缩机"开发音频效果算法。

问题是 禁止使用浮点数据、因为处理器不实现此数据类型。

这就是我需要将其转换为 Q15格式的原因。 但我不知道怎么做。 请帮助。

#这是程序的主体  

float min (float num1、float num2、float num3){
if (num1 < num2 && num1 < num3) return num1;
否则、如果(num2 < num3)返回 num2;
否则返回编号3;

void compexp (float CT、float CS、float ET、float ES){  #here I should use Q15 format  

float tav = 0.01;

浮点= 0.03;
浮点 RT = 0.003;
INT 延迟= 150;
INT xrms = 0;
int g = 1;
数据缓冲区[150]={0};
对于(I = 0;I < W_LEN;+I){
Rin[i]= buf_in_right_1[i];
LIN[i]= buf_in_left_1_[i];

int i;
对于(I = 0;I < W_LEN;+I){
xrm =(1 -tav)* xrm + tav * pow (rin [i]、2);
float X = 10 * log (xrms);
浮点 G =最小值(0、CS *(CT - X)、ES *(ET - X));
int f = pow (10、G / 20);
浮点系数;
如果(f < g){
COEff = AT;
}否则{
COEff = RT;


G =(1 -系数)* g +系数* f;
buf_out_right_1[i]= g * buffer[149];
缓冲器[0]= x[i];

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    抱歉、这是与算法相关的问题、与 SDK 无关或与 SoC 相关的问题。
    此论坛仅讨论有关支持的 SoC (DSP)和处理器 SDK 的硬件和软件相关问题。

    此致、
    Yordan