i think you also have the bug mentioned here and resolved by gerson rosoles sample # 3
i looked at your code and noticed that the init of the audiocontext is NOT tied to a UI event as mentioned in the above linked thread. This is also a cause of issues on ios 11.2+
i think the thread and gerson's sample 3 show the required rearraingment required in the code.
your init needs to be under a UI event like the start button otherwise as explained ios reclaims it
This will also cause symptoms similar to those described in #3
i think you also have the bug mentioned here and resolved by gerson rosoles sample # 3
i looked at your code and noticed that the init of the audiocontext is NOT tied to a UI event as mentioned in the above linked thread. This is also a cause of issues on ios 11.2+
i think the thread and gerson's sample 3 show the required rearraingment required in the code.
your init needs to be under a UI event like the start button otherwise as explained ios reclaims it
This will also cause symptoms similar to those described in #3