/usr/share/doc/libsndobj-dev/examples/example2.cpp is in libsndobj-dev 2.6.6.1-5.
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 | // Example2.cpp
// A dirty reverb showing the use of
// standard operators (+, <<, >>)
// VL, 2001
#include <SndObj/AudioDefs.h>
int
main(int argc, char** argv){
int dur = 60;
SndRTIO input(1, SND_INPUT);
SndObj audio;
Allpass ap1(.1f, .005f, &audio);
Allpass ap2(.55f, .013f, &ap1);
Allpass ap3(.6f, .022f, &ap2);
Allpass ap4(.7f, .035f, &ap3);
SndRTIO output(1, SND_OUTPUT);
for(int i=0; i<dur*(DEF_SR/DEF_VECSIZE);i++){
audio<<input;
ap1.DoProcess();
ap2.DoProcess();
ap3.DoProcess();
ap4.DoProcess();
audio += ap4;
audio>>output;
}
return 1;
}
|