This file is indexed.

/usr/lib/lv2/revdelay-swh.lv2/plugin.ttl is in swh-lv2 1.0.15+git20151104~repack0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
@prefix : <http://lv2plug.in/ns/lv2core#> .
@prefix swh: <http://plugin.org.uk/swh-plugins/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix swhext: <http://plugin.org.uk/extensions#> .
@prefix pg: <http://lv2plug.in/ns/ext/port-groups#> .
@prefix pprops: <http://lv2plug.in/ns/ext/port-props#> .

swh:revdelay a :Plugin ;
   a :DelayPlugin ;

   doap:name "Reverse Delay (5s max)" ;
   doap:maintainer [
      foaf:name "Steve Harris";
      foaf:homepage <http://plugin.org.uk/> ;
      foaf:mbox <mailto:steve@plugin.org.uk> ;
   ] ;
   doap:license <http://usefulinc.com/doap/licenses/gpl> ;
   :documentation <http://plugin.org.uk/ladspa-swh/docs/ladspa-swh.html#revdelay> ;

   :pluginProperty :hardRtCapable ;
    
   :port [
     a :InputPort, :AudioPort ;
     :name "Input" ;
     :index 0 ;
     :symbol "in" ;
   ] ;
  
   :port [
     a :OutputPort, :AudioPort ;
     :name "Output" ;
     :index 1 ;
     :symbol "out" ;
   ] ;
  
   :port [
     a :InputPort, :ControlPort ;
     :name "Delay Time (s)" ;
     :index 2 ;
     :symbol "delay_time" ;
     :minimum 0 ;
     :maximum 5.0 ;
     
     :default 0.0 ;
   ] ;
  
   :port [
     a :InputPort, :ControlPort ;
     :name "Dry Level (dB)" ;
     :index 3 ;
     :symbol "dry_level" ;
     :minimum -70 ;
     :maximum 0 ;
     
     :default 0.0 ;
   ] ;
  
   :port [
     a :InputPort, :ControlPort ;
     :name "Wet Level (dB)" ;
     :index 4 ;
     :symbol "wet_level" ;
     :minimum -70 ;
     :maximum 0 ;
     
     :default 0.0 ;
   ] ;
  
   :port [
     a :InputPort, :ControlPort ;
     :name "Feedback" ;
     :index 5 ;
     :symbol "feedback" ;
     :minimum 0 ;
     :maximum 1 ;
     
     :default 0.0 ;
   ] ;
  
   :port [
     a :InputPort, :ControlPort ;
     :name "Crossfade samples" ;
     :index 6 ;
     :symbol "xfade_samp" ;
     :minimum 0 ;
     :maximum 5000 ;
     
     :default 1250 ;
     :portProperty :integer ;
   ] ;
  
   swhext:code """
      #include "ladspa-util.h"
      #include <stdio.h>

      #define MIN(a,b) ((a) < (b) ? (a) : (b))
      #define CALC_DELAY(delaytime) \\
        (f_clamp (delaytime * sample_rate, 1.f, (float)(buffer_size + 1)))

    """ ;

   swhext:callback [
     swhext:event "instantiate" ;
     swhext:code """
      sample_rate = s_rate;
      buffer_size = 0;
      delay_samples = 0;
      last_delay_time = 0;
      write_phase = 0;
    """ ;
   ] ;
  
   swhext:callback [
     swhext:event "activate" ;
     swhext:code """
      unsigned int size;

      size = sample_rate * 5 * 2; /* 5 second maximum */
        
      /* calloc sets the buffer to zero. */
      plugin_data->buffer = calloc(size, sizeof(LADSPA_Data));

      plugin_data->buffer_size = size;
      plugin_data->write_phase = 0;
      plugin_data->delay_samples = 0;
    """ ;
   ] ;
  
   swhext:callback [
     swhext:event "cleanup" ;
     swhext:code """
      free(plugin_data->buffer);
    """ ;
   ] ;
  
   swhext:callback [
     swhext:event "run" ;
     swhext:code """
      int i;
      unsigned long delay2;
      float dry = DB_CO(dry_level);
      float wet = DB_CO(wet_level);
      float fadescale;
      unsigned long xfadesamp = xfade_samp;

      if (write_phase == 0) {
        plugin_data->last_delay_time = delay_time;
        plugin_data->delay_samples = delay_samples = CALC_DELAY (delay_time);
      }

      if (delay_time == last_delay_time) {
        long idelay_samples = (long)delay_samples;
        delay2 = idelay_samples * 2;

        if (xfadesamp > idelay_samples) {
            /* force it to half */
            xfadesamp = idelay_samples / 2;
        }

        for (i=0; i<sample_count; i++) {
          long read_phase = delay2 - write_phase;
          LADSPA_Data read;
          LADSPA_Data insamp;

          insamp = in[i];
          read =  (wet * buffer[read_phase]) + (dry * insamp);

          if ( (write_phase % idelay_samples) < xfadesamp) {
            fadescale = (write_phase % idelay_samples) / (1.0 * xfadesamp);
          }
          else if ((write_phase % idelay_samples) > (idelay_samples - xfadesamp)) {
            fadescale = (idelay_samples - (write_phase % idelay_samples)) / (1.0 * xfadesamp);
          }
          else {
            fadescale = 1.0;
          }

          buffer[write_phase] = fadescale * (insamp + (feedback * read)); 
	  buffer[write_phase] = flush_to_zero(buffer[write_phase]);
                  
	  buffer_write(out[i], read);
          write_phase = (write_phase + 1) % delay2;
        }
      } else {
        float next_delay_samples = CALC_DELAY (delay_time);
        float delay_samples_slope = (next_delay_samples - delay_samples) / sample_count;

        for (i=0; i<sample_count; i++) {
          long read_phase, idelay_samples;
          LADSPA_Data frac, read;
          LADSPA_Data insamp;
          insamp = in[i];

          delay_samples += delay_samples_slope;
          delay2 = (long) (delay_samples * 2);
          write_phase = (write_phase + 1) % delay2;

          read_phase = delay2 - write_phase;
          idelay_samples = (long)delay_samples;
          frac = delay_samples - idelay_samples;
          read = wet * buffer[read_phase]   + (dry * insamp);

          if ((write_phase % idelay_samples) < xfade_samp) {
            fadescale = (write_phase % idelay_samples) / (1.0 * xfade_samp);
          }
          else if ((write_phase % idelay_samples) > (idelay_samples - xfade_samp)) {
            fadescale = (idelay_samples - (write_phase % idelay_samples)) / (1.0 * xfade_samp);
          }
          else {
            fadescale = 1.0;
          }

          buffer[write_phase] = fadescale * (insamp + (feedback * read)); 
	  buffer[write_phase] = flush_to_zero(buffer[write_phase]);

	  buffer_write(out[i], read);
        }

        plugin_data->last_delay_time = delay_time;
        plugin_data->delay_samples = delay_samples;
      }
      
      plugin_data->write_phase = write_phase;
    """ ;
   ] ;
  
   swhext:createdBy <http://plugin.org.uk/swh-plugins/toTurtle.xsl> .