comparison efrtest/cod-parse.c @ 128:a5ffec18e4cd

test programs: use printf %d format for codec parameters Even though all codec params (both FR and EFR) are small unsigned integers, we use signed int16_t data type for both, for interface reasons: in the case of FR it's the gsm_signal type of libgsm, and in the case of EFR it's the Word16 type of ETSI codec guts. Therefore, the correct printf format is %d, not %u, when the objective is to see what's in the variables (what the compiler sees) and catch any bugs.
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 11 Dec 2022 04:00:13 +0000
parents 5a63294fa321
children 90b9c7c3fa3b
comparison
equal deleted inserted replaced
127:4af99bf8671a 128:a5ffec18e4cd
106 input_bits[244], input_bits[245], 106 input_bits[244], input_bits[245],
107 EFR_sid_classify(frame)); 107 EFR_sid_classify(frame));
108 EFR_frame2params(frame, params); 108 EFR_frame2params(frame, params);
109 n = 0; 109 n = 0;
110 for (i = 0; i < 5; i++) 110 for (i = 0; i < 5; i++)
111 printf(" %u", params[n++]); 111 printf(" %d", params[n++]);
112 putchar('\n'); 112 putchar('\n');
113 for (i = 0; i < 4; i++) { 113 for (i = 0; i < 4; i++) {
114 putchar(' '); 114 putchar(' ');
115 for (j = 0; j < 13; j++) 115 for (j = 0; j < 13; j++)
116 printf(" %u", params[n++]); 116 printf(" %d", params[n++]);
117 putchar('\n'); 117 putchar('\n');
118 } 118 }
119 } 119 }
120 } 120 }