Hey Jules -
I love the new FloatVectorOperations class. I've been adding them everywhere I can lately.
However, I've just noticed that in a very particular circumstances they break.
Specifically - Win32 Release mode plugins.
Seriously - they operate fine on mac, or Win 64 bit, or in debug mode, in in any standalone program .... but not in Release mode, 32 bit, Windows. plugins.
You can replicate this just by doing a AudioSampleBuffer::addFrom() in the processBlock of the Juce plugin example (and the FloatVectorOperations::add inside there craps out). copyFrom works fine (FloatVecotrOperations::copy seems ok).
It's just the FloatVectorOperations::add and FloatVectorOperations::multiply that have issues (so really I think it must be something about the _mm_add_ps call in:
JUCE_PERFORM_SSE_OP_SRC_DEST (dest[i] += src[i],
_mm_add_ps (d, s),
JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST)
Just for reference ... here is the code I'm using in the plugin example:
void JuceDemoPluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages)
{
const int numSamples = buffer.getNumSamples();
int channel, dp = 0;
// Go through the incoming data, and apply our gain to it...
for (channel = 0; channel < getNumInputChannels(); ++channel)
buffer.applyGain (channel, 0, buffer.getNumSamples(), gain);
AudioSampleBuffer temp(buffer.getNumChannels(), numSamples);
// CAUSES a CRASH .... in win32 release mode
for (short chan=0; chan<buffer.getNumChannels(); chan++)
buffer.addFrom(chan, 0, temp.getSampleData(chan), numSamples);
Ok - take a look when you get a minute.
