diff effects/distortion/Source/PluginProcessor.cpp @ 1:04e171d2a747 tip

JUCE 4 compatible. Standardised paths on Mac: modules '../../juce/modules'; VST folder '~/SDKs/vstsdk2.4' (JUCE default). Replaced deprecated 'getSampleData(channel)'; getToggleState(...); setToggleState(...); setSelectedId(...). Removed unused variables. Ignore JUCE code and build files.
author Brecht De Man <b.deman@qmul.ac.uk>
date Sun, 22 Nov 2015 15:23:40 +0000
parents e32fe563e124
children
line wrap: on
line diff
--- a/effects/distortion/Source/PluginProcessor.cpp	Fri Oct 10 15:41:23 2014 +0100
+++ b/effects/distortion/Source/PluginProcessor.cpp	Sun Nov 22 15:23:40 2015 +0000
@@ -36,8 +36,6 @@
 #include "PluginProcessor.h"
 #include "PluginEditor.h"
 
-const float DENORMAL_THRESH = 1e-6f;
-
 #if JUCE_INTEL
  #define JUCE_SNAP_TO_ZERO(n)    if (! (n < -1.0e-8 || n > 1.0e-8)) n = 0;
 #else
@@ -90,7 +88,7 @@
         
         // Put track audio data into _currentTrackBuffer
         float * originalData = new float;
-        originalData = buffer.getSampleData(channel);
+        originalData = buffer.getWritePointer(channel);
         
         // Apply distortion (sample per sample)
         switch (_typeNumber) {