I'm working with a 2-channel, 32-bit float, 44100 Hz audio format and using float chunks[2][2048*8]
for smooth playback. Currently, this chunk size is the smallest that can play without distortion, although sometimes I need to restart the program to eliminate distortion. When using a chunk for example size of 2048*5 it's choppy but if i re-run couple of times, it plays smoothly.
In an attempt to improve performance, I implemented a thread for the callback function, but this did not resolve the problem. I also created a separate test project with only audio output, where the system handled a chunk size of 3000 floats without issue. However, I'm unable to replicate this performance in my main media player project, and I need advice on how to optimize for consistent low-latency playback without sacrificing smoothness.
Any suggestions on how to improve latency and stability for small chunk sizes in my media player?