diff options
Diffstat (limited to 'examples/example2.cpp')
| -rw-r--r-- | examples/example2.cpp | 10 | 
1 files changed, 3 insertions, 7 deletions
diff --git a/examples/example2.cpp b/examples/example2.cpp index 415c1ff..13e8228 100644 --- a/examples/example2.cpp +++ b/examples/example2.cpp @@ -50,7 +50,6 @@ public:      }      void write(double value) { -        //https://www.cplusplus.com/forum/beginner/166954/          write_word((short) (value * SHRT_MAX * 0.5), 2);      } @@ -82,17 +81,14 @@ public:      void run() {          int total_samples = 30 * samplerate;          int sample = 0; -        short data; -        gs->randomiseFilters(); +        FLT data;          gs->filtersOn(true);          gs->smoothing(true);          gs->distortionMethod(2); -         +        gs->randomiseFilters(); +          for (int sample = 0; sample < total_samples; sample ++) {              data = gs->process(); -            if (data > 0) { -                std::cout << data; -            }              wav->write(data);              if (sample % samplerate == 0) { // randomise every second  |