Reduce AudioBuffer Memory Usage
anthumchris opened this issue · comments
@teropa made a great recommendation to add backpressure to the decoder. This would prevent excessive memory use by limiting the number of unplayed, decoded AudioBuffers. One suggestion is to control the amount of decoded audio based on time (seconds), because DecodedAudioPlaybackBuffer grows audio buffers in size exponentially, creating lots of small buffers at first to provide low latency playback and then growing the sizes to create fewer, larger AudioBuffers, which reduces CPU and audio glitches.