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: Audio effect

Part Number: TMS320C5515

Tool/software: Code Composer Studio

I am developing a audio effect algorithm for "Multiband compressor".

The problem is that the use of float data is prohibited, since the processor does not implement this data type.

Thats why I need to convert it to Q15 format. But I dont know how can I do it. Please help.

main.c.c
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include "C5515.h"
#include "gpio.h"
#include "i2c.h"
#include "i2s.h"
#include "TMS320.h"
#include "stdio.h"
#include "math.h"
#include "dsplib.h"
#include "dsplib_c.h"
#include "aic3204.h"
#define W_LEN 512
#define I 1
#define NH 21
#define EFFECT_FLAG 1
#define NO_EFFECT_FLAG 0
#define IER0 (*(unsigned int*)0x00)
#define IVPD (*(unsigned int*)0x000049)
#define IVPH (*(unsigned int*)0x00004A)
extern unsigned int VECSTART;
/*********Áóôåðû ëåâîãî è ïðàâîãî êàíàëà************/
Int16 b1[W_LEN] = { 0 };
Int16 b2[W_LEN] = { 0 };
Int16 b3[W_LEN] = { 0 };
Int16 b4[W_LEN] = { 0 };
Int16 b5[W_LEN] = { 0 };
Int16 b6[W_LEN] = { 0 };
Int16 b7[W_LEN] = { 0 };
Int16 b8[W_LEN] = { 0 };
Int16* buf_in_left_1 = b1;
Int16* buf_in_right_1 = b2;
Int16* buf_out_left_1 = b3;
Int16* buf_out_right_1 = b4;
Int16* buf_in_left_2 = b5;
Int16* buf_in_right_2 = b6;
Int16* buf_out_left_2 = b7;
Int16* buf_out_right_2 = b8;
Int16* change;
Int16 buf_index = 0;
Int16 effect_flag = NO_EFFECT_FLAG;
/* Îáðàáîò÷èê ïðåðûâàíèÿ ïî ïåðåäà÷å */
interrupt void i2s2_tx_isr()
{
I2S2_W0_MSW_W = buf_out_left_2[buf_index];
I2S2_W1_MSW_W = buf_out_right_2[buf_index];
while ((Rcv & I2S2_IR) == 0);
buf_in_left_2[buf_index] = I2S2_W0_MSW_R;
buf_in_right_2[buf_index] = I2S2_W1_MSW_R;
buf_index++;
if (buf_index >= W_LEN) {
change = buf_in_left_2;
buf_in_left_2 = buf_in_left_1;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX