Mercurial > hg > audio_effects_textbook_code
comparison effects/pvoc_pitchshift/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 |
---|---|
352 double dx; | 352 double dx; |
353 | 353 |
354 | 354 |
355 | 355 |
356 // channelData is an array of length numSamples which contains the audio for one channel | 356 // channelData is an array of length numSamples which contains the audio for one channel |
357 float* channelData = buffer.getSampleData(channel); | 357 float* channelData = buffer.getWritePointer(channel); |
358 | 358 |
359 // inputBufferData is the circular buffer for collecting input samples for the FFT | 359 // inputBufferData is the circular buffer for collecting input samples for the FFT |
360 float* inputBufferData = inputBuffer_.getSampleData(jmin (channel, inputBuffer_.getNumChannels() - 1)); | 360 float* inputBufferData = inputBuffer_.getWritePointer(jmin (channel, inputBuffer_.getNumChannels() - 1)); |
361 float* outputBufferData = outputBuffer_.getSampleData(jmin (channel, inputBuffer_.getNumChannels() - 1)); | 361 float* outputBufferData = outputBuffer_.getWritePointer(jmin (channel, inputBuffer_.getNumChannels() - 1)); |
362 | 362 |
363 // State variables need to be temporarily cached for each channel. We don't want the | 363 // State variables need to be temporarily cached for each channel. We don't want the |
364 // operations on one channel to affect the identical behaviour of the next channel | 364 // operations on one channel to affect the identical behaviour of the next channel |
365 inwritepos = inputBufferWritePosition_; | 365 inwritepos = inputBufferWritePosition_; |
366 outwritepos = outputBufferWritePosition_; | 366 outwritepos = outputBufferWritePosition_; |