Hi, I have a rather mundane question about the mechanics of Swift when implementing blocks that may run on a separate thread, such as the one in installTap(onBus:)
For the time being it isn't necessary to make a full-blown AudioUnit out of what I'm doing, I just need to listen for incoming audio and process it slightly. The processing involves some buffering, filtering, hence these are kept as classes, such that they remember state, past samples, etc. My question is then, when I access "self" in this listening tap block, does this slow the thread signficantly? If so, tricks to keep state across taps are very welcome 🙂
An aside to this topic; how does one ensure that the block finishes before the next? My first thought was a check sum and invalidate the result of one block if the check fails, but does the API provide some neat trick for this?