My Juce-based audio app can play 4 MP3’s simulteaneously. The MP3 (buffered) decoding is done at a high priority ( 8 ), the sound is output via ASIO (using AudioDeviceManager), so its priority is also very high (!?).
Everything works alright, no clicks no pops…
… until I choose to make a “scan” of the hard disk while the MP3’s are playing. The scan is basically recursively scanning the folder structure of the hard disk into a customized TreeView, which then displays its contents. This is done at lowest possible priority ( 0 ).
Why does this scanning lead to clicks or pops (very rarely) although it is done at lowest priority? It is really not acceptable. There are many apps (like NI Traktor) who do file analyzing/scanning during sound play and show no signs of pops or crackles during their analyzing/scanning.
What can I do about it? Put some sleep() into the scanning process?