I wrote a plugin, periodically sending data to an audio track:
// This is the place where you’d normally do the guts of your plugin’s
_ // audio processing…_
_ int *tmp = new intbuffer.getNumSamples();_
_ for(int i = 0; i < buffer.getNumSamples(); i++)_
_ tmp[i] = 0x3E800000 + i;_
_ _
_ for (int channel = 0; channel < totalNumOutputChannels; ++channel)_
_ {_
_ // …do something to the data…_
_ memcpy(buffer.getWritePointer(channel), tmp, buffer.getNumSamples() * sizeof(int));_
_ }_
_ _
_ delete[] tmp;_
_ tmp = 0;_
(nothing to do with int or float, just to check the memory data)
Then I connected Pro Tools system(HD MADI out) with RME MADIface(MADI in) w/ coaxial cable, just to check whether the data at RME input was still the same.
Then I opened the JUCE Recording Demo and observe the “const float **inputChannelData” in audioDeviceIOCallback, but the data was not the same:
According to the plugin code, I should get 0x3e800000, 0x3e800001, then 02, 03, 04…3ff, 00, 01, 02, 03, etc.
But int the Recording Demo I got 00, 00, 00, 00, 04, 04, 04, 04, 08, 08, 08, 08…
And when I changed the plugin code into i*2, I got 0, 0, 4, 4, 8, 8, c, c…(should be 0 2 4 6 8 a c e…)
I really wanna know who changed the data…Any ideas?
Is there a way that can keep the data unchanged?