Closed glaurent closed 7 years ago
Thanks for the fix. I've been noticing this problem too!
Thanks @glaurent!
OK, after further tests it seems this doesn't fix the initial issue, I still have it, although less often :-(.
I was fooling around with this issue last night and noticed that the issue comes up randomly and unpredictably, making it difficult to replicate. I'm not an expert on AVFoundation but I'm wondering if it's a timing issue between multiple threads.
This fixes a problem which occurs on iOS10, where on the first time a PitchEngine is instantiated and started, the installTap() block would never be called (and so no pitch recognition would happen). For some reason, this occurs only the first time a PitchEngine is created and run. Looking for some other examples of installTap, it seems one should pass the outputFormat and not the inputFormat as a parameter.
Signed-off-by: Guillaume Laurent glaurent@telegraph-road.org