I created a new test app, Standalone Plugin for iOS. All it does is generate a sine wave. The only changes from the default app is my processBlock which looks like this:
void IaatestAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages)
{
const int totalNumOutputChannels = getTotalNumOutputChannels();
buffer.clear();
float* channelData0 = buffer.getWritePointer (0);
float* channelData1 = totalNumOutputChannels > 1 ? buffer.getWritePointer (1) : nullptr;
double currentStep = 200 / getSampleRate();
const int num = buffer.getNumSamples();
for (int i = 0; i < num; i++)
{
phase += currentStep;
if (phase >= 1.0)
phase -= 1.0;
float val = 0;
val = std::sin (phase * float_Pi * 2);
channelData0[i] = val;
if (channelData1 != nullptr) channelData1[i] = val;
}
}
It works fine on macOS or iOS if I build from master. But if I build from develop, it works fine on macOS but I only get noise in the right channel on iOS. Wave of output here:
https://vocaroo.com/i/s0YR72xPcS61
Any idea what’s changed lately? I’m compiling with Xcode 8.2.1 The code is here in the IAATest folder https://github.com/FigBug/juce_bugs I’ve also reproduced it on another machine running Xcode 8.3.3
