Maybe I'm wrong, but it looks like you should prioritize your thread in the CPU. When the application is in the background (or destroyed, but with live threads), the threads are prioritized by the OS and their activity decreases most of the time, especially if they were initialized with the default priority - BACKGROUND (which is low).
Try working with HandlerThread (android.os). That way you can determine your priority, and in your case I can try THREAD_PRIORITY_AUDIO
Java: (sorry for the lack of C ++)
HandlerThread thread = new HandlerThread("MyThread", Process.THREAD_PRIORITY_AUDIO)
source share