~ubuntu-branches/ubuntu/raring/lmms/raring-proposed

« back to all changes in this revision

Viewing changes to plugins/ladspa_effect/caps/Compress.cc

  • Committer: Charlie Smotherman
  • Date: 2012-12-05 22:08:38 UTC
  • mfrom: (33.1.7 lmms_0.4.13)
  • Revision ID: cjsmo@cableone.net-20121205220838-09pjfzew9m5023hr
* New  Upstream release.
  - Minor tweaking to ZynAddSubFX, CALF, SWH plugins  and Stefan Fendt's RC
    filters.
  - Added UI fixes: Magnentic effect of knobs and Piano-roll fixes
  - Updated German localization and copyright year
* debian/lmms-common.install:
  - added /usr/share/applications so the lmms.desktop file will correctly
    install (LP: #863366)
  - This should also fix the Software Center not displaying lmms in sound
    and video (LP: #824231)

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
void
36
36
Compress::one_cycle (int frames)
37
37
{
38
 
        d_sample * s = ports[0];
 
38
        sample_t * s = ports[0];
39
39
 
40
 
        d_sample range = DSP::db2lin (getport(1)); 
41
 
        d_sample ratio = (*ports[2] - 1) / getport(2);
 
40
        sample_t range = DSP::db2lin (getport(1)); 
 
41
        sample_t ratio = (*ports[2] - 1) / getport(2);
42
42
 
43
43
        /* sc1 has lookup tables here, and they're only 40 % used (400 ms/1 s). 
44
44
         * thus, sc1's attack/release controls are a bit coarse due to truncation 
54
54
        double ga = exp (-1 / (fs * getport(3))); 
55
55
        double gr = exp (-1 / (fs * getport(4)));
56
56
 
57
 
        d_sample threshold = getport(5);
58
 
        d_sample knee = getport(6);
59
 
 
60
 
        d_sample * d = ports[7];
61
 
 
62
 
        d_sample knee0 = DSP::db2lin (threshold - knee);
63
 
        d_sample knee1 = DSP::db2lin (threshold + knee);
64
 
 
65
 
        d_sample ef_a = ga * .25;
66
 
        d_sample ef_ai = 1 - ef_a;
 
57
        sample_t threshold = getport(5);
 
58
        sample_t knee = getport(6);
 
59
 
 
60
        sample_t * d = ports[7];
 
61
 
 
62
        sample_t knee0 = DSP::db2lin (threshold - knee);
 
63
        sample_t knee1 = DSP::db2lin (threshold + knee);
 
64
 
 
65
        sample_t ef_a = ga * .25;
 
66
        sample_t ef_ai = 1 - ef_a;
67
67
        
68
68
        for (int i = 0; i < frames; ++i)
69
69
        {