Mercurial > hg > audio_effects_textbook_code
comparison effects/pvoc_passthrough/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 |
---|---|
274 // Go through each channel of audio that's passed in. Collect the samples in the input | 274 // Go through each channel of audio that's passed in. Collect the samples in the input |
275 // buffer. When we've reached the next hop interval, calculate the FFT. | 275 // buffer. When we've reached the next hop interval, calculate the FFT. |
276 for (channel = 0; channel < numInputChannels; ++channel) | 276 for (channel = 0; channel < numInputChannels; ++channel) |
277 { | 277 { |
278 // channelData is an array of length numSamples which contains the audio for one channel | 278 // channelData is an array of length numSamples which contains the audio for one channel |
279 float* channelData = buffer.getSampleData(channel); | 279 float* channelData = buffer.getWritePointer(channel); |
280 | 280 |
281 // inputBufferData is the circular buffer for collecting input samples for the FFT | 281 // inputBufferData is the circular buffer for collecting input samples for the FFT |
282 float* inputBufferData = inputBuffer_.getSampleData(jmin (channel, inputBuffer_.getNumChannels() - 1)); | 282 float* inputBufferData = inputBuffer_.getWritePointer(jmin (channel, inputBuffer_.getNumChannels() - 1)); |
283 float* outputBufferData = outputBuffer_.getSampleData(jmin (channel, inputBuffer_.getNumChannels() - 1)); | 283 float* outputBufferData = outputBuffer_.getWritePointer(jmin (channel, inputBuffer_.getNumChannels() - 1)); |
284 | 284 |
285 // State variables need to be temporarily cached for each channel. We don't want the | 285 // State variables need to be temporarily cached for each channel. We don't want the |
286 // operations on one channel to affect the identical behaviour of the next channel | 286 // operations on one channel to affect the identical behaviour of the next channel |
287 inwritepos = inputBufferWritePosition_; | 287 inwritepos = inputBufferWritePosition_; |
288 outwritepos = outputBufferWritePosition_; | 288 outwritepos = outputBufferWritePosition_; |