This file is indexed.

/usr/share/faust/api/android/DspFaust.h is in faust-common 0.9.95~repack1-2.

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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
/************************************************************************
 ************************************************************************
 FAUST API Architecture File
 Copyright (C) 2016 GRAME, Romain Michon, CCRMA - Stanford University
 Copyright (C) 2014-2016 GRAME, Centre National de Creation Musicale
 ---------------------------------------------------------------------

 This is sample code. This file is provided as an example of minimal
 FAUST architecture file. Redistribution and use in source and binary
 forms, with or without modification, in part or in full are permitted.
 In particular you can create a derived work of this FAUST architecture
 and distribute that work under terms of your choice.

 This sample code is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 ************************************************************************
 ************************************************************************/

//===============API Reference==============
//==========================================

class FaustPolyEngine;

class DspFaust
{
public:
	//--------------`DspFaust(int SR, int BS)`----------------
	// Constructor.
	//
	// #### Arguments
	//
	// * `SR`: sampling rate
	// * `BS`: block size
	//--------------------------------------------------------
	DspFaust(int,int);
	~DspFaust();

	//---------------------`bool start()`---------------------
	// Start the audio processing.
	//
	// Returns `true` if successful and `false` if not.
	//--------------------------------------------------------
	bool start();
  
	//-----------------`void stop()`--------------------------
	// Stop the audio processing. 
	//--------------------------------------------------------
	void stop();

	//---------------------`bool isRunning()`-----------------
	// Returns `true` if audio is running.
	//--------------------------------------------------------
	bool isRunning();

	//--------`long keyOn(int pitch, int velocity)`-----------
	// Instantiate a new polyphonic voice. This method can
	// only be used if the `[style:poly]` metadata is used in
	// the Faust code or if the `-polyvoices` flag has been
	// provided before compilation.
	//
	// `keyOn` will return 0 if the Faust object is not
	// polyphonic or the address to the allocated voice as
	// a `long` otherwise. This value can be used later with
	// [`setVoiceParamValue`](#setvoiceparamvalue) or
	// [`getVoiceParamValue`](#getvoiceparamvalue) to access
	// the parameters of a specific voice.
	//
	// #### Arguments
	//
	// * `pitch`: MIDI note number (0-127)
	// * `velocity`: MIDI velocity (0-127)
	//--------------------------------------------------------
	unsigned long keyOn(int, int);

	//----------------`int keyOff(int pitch)`-----------------
	// De-instantiate a polyphonic voice. This method can
	// only be used if the `[style:poly]` metadata is used in
	// the Faust code or if the `-polyvoices` flag has been
	// provided before compilation.
	//
	// `keyOff` will return 0 if the object is not polyphonic
	// and 1 otherwise.
	//
	// #### Arguments
	//
	// * `pitch`: MIDI note number (0-127), should be the same
	// as the one used for `keyOn`
	//--------------------------------------------------------
	int keyOff(int);

	//-------------------`long newVoice()`--------------------
	// Instantiate a new polyphonic voice. This method can
	// only be used if the `[style:poly]` metadata is used in
	// the Faust code or if `-polyvoices` flag has been
	// provided before compilation.
	//
	// `keyOn` will return 0 if the Faust object is not
	// polyphonic or the address to the allocated voice as
	// a `long` otherwise. This value can be used later with
	// `setVoiceParamValue`, `getVoiceParamValue` or
	// `deleteVoice` to access the parameters of a specific
	// voice.
	//--------------------------------------------------------
	unsigned long newVoice();

	//---------`int deleteVoice(long voice)`------------------
	// De-instantiate a polyphonic voice. This method can
	// only be used if the `[style:poly]` metadata is used in
	// the Faust code or if `-polyvoices` flag has been
	// provided before compilation.
	//
	// `deleteVoice` will return 0 if the object is not polyphonic
	// and 1 otherwise.
	//
	// #### Arguments
	//
	// * `voice`: the address of the voice given by `newVoice`
	//--------------------------------------------------------
	int deleteVoice(unsigned long);

	//-------`void propagateMidi(int count, double time, int type, int channel, int data1, int data2)`--------
	// Take a raw MIDI message and propagate it to the Faust
	// DSP object. This method can be used concurrently with
	// [`keyOn`](#keyOn) and [`keyOff`](#keyOff).
	//
	// `propagateMidi` can
	// only be used if the `[style:poly]` metadata is used in
	// the Faust code or if `-polyvoices` flag has been
	// provided before compilation.
	//
	// #### Arguments
	//
	// * `count`: size of the message (1-3)
	// * `time`: time stamp
	// * `type`: message type (byte)
	// * `channel`: channel number
	// * `data1`: first data byte (should be `null` if `count<2`)
	// * `data2`: second data byte (should be `null` if `count<3`)
	//--------------------------------------------------------
	void propagateMidi(int, double, int, int, int, int);
	
	//-----------------`const char* getJSONUI()`----------------
	// Returns the JSON description of the UI of the Faust object. 
	//--------------------------------------------------------
	const char* getJSONUI();

	//-----------------`const char* getJSONMeta()`----------------
	// Returns the JSON description of the metadata of the Faust object. 
	//--------------------------------------------------------
	const char* getJSONMeta();
	
	//-----------------`int getParamsCount()`-----------------
	// Returns the number of parameters of the Faust object. 
	//--------------------------------------------------------
	int getParamsCount();
	
	//----`void setParamValue(const char* address, float value)`------
	// Set the value of one of the parameters of the Faust
	// object in function of its address (path).
	//
	// #### Arguments
	//
	// * `address`: address (path) of the parameter
	// * `value`: value of the parameter
	//--------------------------------------------------------
	void setParamValue(const char*, float);
	
	//----`void setParamValue(int id, float value)`---
	// Set the value of one of the parameters of the Faust
	// object in function of its id.
	//
	// #### Arguments
	//
	// * `id`: id of the parameter
	// * `value`: value of the parameter
	//--------------------------------------------------------
	void setParamValue(int, float);
	
	//----`float getParamValue(const char* address)`----------
	// Returns the value of a parameter in function of its
	// address (path).
	//
	// #### Arguments
	//
	// * `address`: address (path) of the parameter
	//--------------------------------------------------------
	float getParamValue(const char*);
	
	//---------`float getParamValue(int id)`----------
	// Returns the value of a parameter in function of its
	// id.
	//
	// #### Arguments
	//
	// * `id`: id of the parameter
	//--------------------------------------------------------
	float getParamValue(int);
	
	//----`void setVoiceParamValue(const char* address, long voice, float value)`-----
	// Set the value of one of the parameters of the Faust
	// object in function of its address (path) for a
	// specific voice.
	//
	// #### Arguments
	//
	// * `address`: address (path) of the parameter
	// * `voice`: address of the polyphonic voice (retrieved
	// from `keyOn`
	// * `value`: value of the parameter
	//--------------------------------------------------------
	void setVoiceParamValue(const char*, unsigned long, float);
	
	//----`void setVoiceValue(int id, long voice, float value)`-----
	// Set the value of one of the parameters of the Faust
	// object in function of its id for a
	// specific voice.
	//
	// #### Arguments
	//
	// * `id`: id of the parameter
	// * `voice`: address of the polyphonic voice (retrieved
	// from `keyOn`
	// * `value`: value of the parameter
	//--------------------------------------------------------
	void setVoiceParamValue(int, unsigned long, float);
	
	//----`float getVoiceParamValue(const char* address, long voice)`----
	// Returns the value of a parameter in function of its
	// address (path) for a specific voice.
	//
	// #### Arguments
	//
	// * `address`: address (path) of the parameter
	// * `voice`: address of the polyphonic voice (retrieved
	// from `keyOn`)
	//--------------------------------------------------------
	float getVoiceParamValue(const char*, unsigned long);
	
	//----`float getVoiceParamValue(int id, long voice)`----
	// Returns the value of a parameter in function of its
	// id for a specific voice.
	//
	// #### Arguments
	//
	// * `id`: id of the parameter
	// * `voice`: address of the polyphonic voice (retrieved
	// from `keyOn`)
	//--------------------------------------------------------
	float getVoiceParamValue(int, unsigned long);
	
	//----`const char* getParamAddress(int id)`---------------
	// Returns the address (path) of a parameter in function
	// of its ID.
	//
	// #### Arguments
	//
	// * `id`: id of the parameter
	//--------------------------------------------------------
	const char* getParamAddress(int);
	
	//----`const char* getVoiceParamAddress(int id, long voice)`-----
	// Returns the address (path) of a parameter in function
	// of its ID.
	//
	// #### Arguments
	//
	// * `id`: id of the parameter
	// * `voice`: address of the polyphonic voice (retrieved
	// from `keyOn`)
	//--------------------------------------------------------
	const char* getVoiceParamAddress(int, unsigned long);
	
	//----`void propagateAcc(int acc, float v)`---------------
	// Propagate the RAW value of a specific accelerometer
	// axis to the Faust object.
	//
	// #### Arguments
	//
	// * `acc`: the accelerometer axis (**0**: x, **1**: y, **2**: z)
	// * `v`: the RAW acceleromter value in m/s
	//--------------------------------------------------------
	void propagateAcc(int, float);
	
	//----`void setAccConverter(int p, int acc, int curve, float amin, float amid, float amax)`-----
	// Set the conversion curve for the accelerometer.
	//
	// #### Arguments
	//
	// * `p`: the UI parameter id
	// * `acc`: the accelerometer axis (**0**: x, **1**: y, **2**: z)
	// * `curve`: the curve (**0**: up, **1**: down, **2**: up and down)
	// * `amin`: mapping min point
	// * `amid`: mapping middle point
	// * `amax`: mapping max point
	//--------------------------------------------------------
	// TODO: eventually should add a link to tutorials on this in the doc
	void setAccConverter(int, int, int, float, float, float);
	
	//----`void propagateGyr(int gyr, float v)`---------------
	// Propagate the RAW value of a specific gyroscope
	// axis to the Faust object.
	//
	// #### Arguments
	//
	// * `gyr`: the gyroscope axis (**0**: x, **1**: y, **2**: z)
	// * `v`: the RAW acceleromter value in m/s
	//--------------------------------------------------------
	void propagateGyr(int, float);
	
	//----`void setGyrConverter(int p, int gyr, int curve, float amin, float amid, float amax)`-----
	// Set the conversion curve for the gyroscope.
	//
	// #### Arguments
	//
	// * `p`: the UI parameter id
	// * `acc`: the accelerometer axis (**0**: x, **1**: y, **2**: z)
	// * `curve`: the curve (**0**: up, **1**: down, **2**: up and down)
	// * `amin`: mapping min point
	// * `amid`: mapping middle point
	// * `amax`: mapping max point
	//--------------------------------------------------------
	// TODO: eventually should add a link to tutorials on this in the doc
	void setGyrConverter(int, int, int, float, float, float);
	
	//------------------`float getCPULoad()`------------------
	// Returns the CPU load.
	//--------------------------------------------------------
	float getCPULoad();
	
	int getScreenColor();

private:
	FaustPolyEngine *fPolyEngine;
};