vadymmarkov / Beethoven

:guitar: A maestro of pitch detection.
https://github.com/vadymmarkov
Other
824 stars 146 forks source link

Fix PitchEngine start on iOS10 : the installTap() block would never be called #43

Closed glaurent closed 7 years ago

glaurent commented 7 years ago

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

PCrompton commented 7 years ago

Thanks for the fix. I've been noticing this problem too!

vadymmarkov commented 7 years ago

Thanks @glaurent!

glaurent commented 7 years ago

OK, after further tests it seems this doesn't fix the initial issue, I still have it, although less often :-(.

PCrompton commented 7 years ago

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.