Why does it call AudioOutputUnitStart() function while closing the ios IODevice?

Hi, I just found that the close() function in juce_ios_Audio.cpp file calls AudioOutputUnitStart() function.
Should it be calling AudioOutputUnitStop() instead?

void close()

        if (isRunning)
            isRunning = false;

            if (audioUnit != nullptr)
                AudioOutputUnitStart (audioUnit); // ????
                AudioComponentInstanceDispose (audioUnit);
                audioUnit = nullptr;

            setAudioSessionActive (false);

Looks like this was done in commit 010afc6bafe2f41c3bd77326d1f19a29fecc4e86 (Fixed a problem with iOS audio device shutdown) on January 20, 2016…

Oh…that’s weird, i’m using the latest version Juce

Yep, it’s been there ever since. If that was intentional, a comment in the code would have helped in understanding the reasoning behind it. Probably there is a post here on the forum with info about it (haven’t checked myself).

Thanks for bringing this to our attention. Is this causing you any problems or unexpected behaviour?