OK, the original bug appears to be in the process method of IPhoneAudioIODevice (juce_ios_Audio.cpp):
OSStatus process (AudioUnitRenderActionFlags* flags, const AudioTimeStamp* time,
const UInt32 numFrames, AudioBufferList* data)
{
OSStatus err = noErr;
if (audioInputIsAvailable)
err = AudioUnitRender (audioUnit, flags, time, 1, numFrames, data);
.
.
.
return err;
}
Audio Input IS available, so AudioUnitRender is called. But with 0 inputs set, the input hardware is not enabled (see the code snip I posted before). So the call returns an error. That error is returned at the bottom of the function, so the OS ignores the populated output buffers and plays silence.
Changing the function to:
OSStatus process (AudioUnitRenderActionFlags* flags, const AudioTimeStamp* time,
const UInt32 numFrames, AudioBufferList* data)
{
OSStatus err = noErr;
if (audioInputIsAvailable && numInputChannels > 0)
err = AudioUnitRender (audioUnit, flags, time, 1, numFrames, data);
.
.
.
return err;
}
Allows audio to play even if the DeviceManager is initialized with 0 inputs. Since 0 inputs means that the input hardware is not enabled, this should remove the blinking red bar. However, the simulator does not handle background audio and I don’t have time to setup a provision profile, etc. to run this on a device right now.
I hope that helps. Assuming that resolves your problem (it seemed to here), we should bring it to Jule’s attention.