← Back to context

Comment by TwistedWave

5 months ago

Here is the contents of the bug I have reported with all the details and sample code to reproduce the problem:

https://twistedwave.com/AudioGlitches.zip

It contains a program where the only thing I do in the real-time callback is to count the glitches, and I made sure to mlock() the memory used by the glitch counting code. When the memory pressure increases, it glitches.

The point is to avoid the memory pressure from increasing. Have you investigated the allocation behaviour of ALL the code in your application?

  • The memory pressure is caused by other apps on the user's machine. My test program just increments a counter when there is a glitch, and requires a trivial amount of memory. Yet, it can see glitches when other apps run in the background allocating memory.