summaryrefslogtreecommitdiff
path: root/apps/dsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dsp.c')
-rw-r--r--apps/dsp.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/apps/dsp.c b/apps/dsp.c
index aab1e17022..ec45db0c74 100644
--- a/apps/dsp.c
+++ b/apps/dsp.c
@@ -1618,8 +1618,7 @@ void dsp_set_compressor(void)
1618 bool changed = false; 1618 bool changed = false;
1619 bool active = (threshold < 0); 1619 bool active = (threshold < 0);
1620 1620
1621 int i; 1621 for (int i = 0; i < 5; i++)
1622 for (i = 0; i < 5; i++)
1623 { 1622 {
1624 if (curr_set[i] != new_set[i]) 1623 if (curr_set[i] != new_set[i])
1625 { 1624 {
@@ -1657,7 +1656,6 @@ void dsp_set_compressor(void)
1657 if (changed && active) 1656 if (changed && active)
1658 { 1657 {
1659 /* configure variables for compressor operation */ 1658 /* configure variables for compressor operation */
1660 int i;
1661 const int32_t db[] ={0x000000, /* positive db equivalents in S15.16 format */ 1659 const int32_t db[] ={0x000000, /* positive db equivalents in S15.16 format */
1662 0x241FA4, 0x1E1A5E, 0x1A94C8, 0x181518, 0x1624EA, 0x148F82, 0x1338BD, 0x120FD2, 1660 0x241FA4, 0x1E1A5E, 0x1A94C8, 0x181518, 0x1624EA, 0x148F82, 0x1338BD, 0x120FD2,
1663 0x1109EB, 0x101FA4, 0x0F4BB6, 0x0E8A3C, 0x0DD840, 0x0D3377, 0x0C9A0E, 0x0C0A8C, 1661 0x1109EB, 0x101FA4, 0x0F4BB6, 0x0E8A3C, 0x0DD840, 0x0D3377, 0x0C9A0E, 0x0C0A8C,
@@ -1728,7 +1726,7 @@ void dsp_set_compressor(void)
1728 comp_curve[0] = UNITY; 1726 comp_curve[0] = UNITY;
1729 /* comp_curve[1 to 63] are intermediate compression values corresponding 1727 /* comp_curve[1 to 63] are intermediate compression values corresponding
1730 to the 6 MSB of the input values of a non-clipped signal */ 1728 to the 6 MSB of the input values of a non-clipped signal */
1731 for (i = 1; i < 64; i++) 1729 for (int i = 1; i < 64; i++)
1732 { 1730 {
1733 /* db constants are stored as positive numbers; 1731 /* db constants are stored as positive numbers;
1734 make them negative here */ 1732 make them negative here */
@@ -1766,7 +1764,7 @@ void dsp_set_compressor(void)
1766 db_curve[1].offset = 0; 1764 db_curve[1].offset = 0;
1767 db_curve[3].db = 0; 1765 db_curve[3].db = 0;
1768 1766
1769 for (i = 0; i <= 4; i++) 1767 for (int i = 0; i <= 4; i++)
1770 { 1768 {
1771 logf("Curve[%d]: db: % 6.2f\toffset: % 6.2f", i, 1769 logf("Curve[%d]: db: % 6.2f\toffset: % 6.2f", i,
1772 (float)db_curve[i].db / (1 << 16), 1770 (float)db_curve[i].db / (1 << 16),
@@ -1774,7 +1772,7 @@ void dsp_set_compressor(void)
1774 } 1772 }
1775 1773
1776 logf("\nGain factors:"); 1774 logf("\nGain factors:");
1777 for (i = 1; i <= 65; i++) 1775 for (int i = 1; i <= 65; i++)
1778 { 1776 {
1779 debugf("%02d: %.6f ", i, (float)comp_curve[i] / UNITY); 1777 debugf("%02d: %.6f ", i, (float)comp_curve[i] / UNITY);
1780 if (i % 4 == 0) debugf("\n"); 1778 if (i % 4 == 0) debugf("\n");