I think iOS Audio is broken in develop

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();


    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:


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

The iOSAudioDevice class has been completely refactored. However, I’m afraid I can’t reproduce your problem.

I cloned the GitHub repo, built the project, ran it on an iPad Mini 3 with iOS 11.1 and everything worked as expected.

I’m still on iOS 10, testing on a iPhone 7. Does it on both the device and the simulator.

OK, I can reproduce it in the simulator. Will investigate.