Mercurial > hg > audio_effects_textbook_code
comparison effects/vibrato/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 |
comparison
equal
deleted
inserted
replaced
0:e32fe563e124 | 1:04e171d2a747 |
---|---|
247 // a stereo chorus or panner, you might do something different for each channel. | 247 // a stereo chorus or panner, you might do something different for each channel. |
248 | 248 |
249 for (channel = 0; channel < numInputChannels; ++channel) | 249 for (channel = 0; channel < numInputChannels; ++channel) |
250 { | 250 { |
251 // channelData is an array of length numSamples which contains the audio for one channel | 251 // channelData is an array of length numSamples which contains the audio for one channel |
252 float* channelData = buffer.getSampleData(channel); | 252 float* channelData = buffer.getWritePointer(channel); |
253 | 253 |
254 // delayData is the circular buffer for implementing delay on this channel | 254 // delayData is the circular buffer for implementing delay on this channel |
255 float* delayData = delayBuffer_.getSampleData (jmin (channel, delayBuffer_.getNumChannels() - 1)); | 255 float* delayData = delayBuffer_.getWritePointer (jmin (channel, delayBuffer_.getNumChannels() - 1)); |
256 | 256 |
257 // Make a temporary copy of any state variables declared in PluginProcessor.h which need to be | 257 // Make a temporary copy of any state variables declared in PluginProcessor.h which need to be |
258 // maintained between calls to processBlock(). Each channel needs to be processed identically | 258 // maintained between calls to processBlock(). Each channel needs to be processed identically |
259 // which means that the activity of processing one channel can't affect the state variable for | 259 // which means that the activity of processing one channel can't affect the state variable for |
260 // the next channel. | 260 // the next channel. |