We are developing a Windows program base on Juce 5.4.5 which supports common 5.1 and 7.1 sound cards, we started off learning from online tutorials, reading source code and testing sample program from the folder ./extra/AudioPluginHost.
The idea is to run multiple VST3 plugin on top of AudioPluginHost using freeware like Frequalizer (https://github.com/ffAudio/Frequalizer) spliting two input channels into multiple streams each passthrough a Frequalizer and attach to the 6 channels audio out independently. Test commences across multiple machines each with different conditions, and the result is not satisfactory. We encounter have it works perfectly for the first 15 minutes most of the time, but then glitches comes like every 5 minutes. And 2-3 hours later pops increases like every 2 minutes, until it die somewhere between 3 hours to 3 days. The way it die are either no sound or loud pops.
The sound is on soundcloud
Software is build on Visual Studio 2017 over Windows 10, I ran it under debug mode 64 bits. Here is the findings:
observation: over the course of debugging it is found that memory was always stable and no anomaly, cpu runs like a wave going up and down irregularly, but they shape look nature and smooth. However when the initial glitch/short-pops occurs CPU utilization goes up and plateau(flatten), suspect a mis-handling occurs. When towards the end before death nothing abnormal found, until the moment loud pop which means reach the point of total failure memory and CPU graph both seems normal, so “break all” the debugger and found most of the time it spend inside WaitableEvent …
a lot of time spent on a thread JUCE Timer
WaitableEvent::wait(const int timeOutMs)
(timeOutMs = 12 at one time, another time timeOutMs = 25)
and we also notice that the output of the program had 16 thread exit each with exit code 0
Our best guess is that the source (audio in) drain out, leaving Juce and AudioPluginHost repeat wait - playback remain in buffer - and repeat wait forever.
- PC is i7-6560 CPU, 8 GB ram
- Sound card is Soundblaster Omni Surround 5.1 USB sound card, using two of its analog input, and six of its analog output channels
- Config inside AudioPluginHost is 256 samples
Your help is greatly appreciated, thank you so much for help!!!