hoglet wrote:...I'm finding that tracks played in Music 5000 are suffering audio break-up/stuttering. I've quickly switched back to the code on master, and that seems to be fine. Doubling the M5 buffering from 750 to 1500 seems to resolve the issue.
Dave, interestingly pixelblip found it too small too. When I was trying different values 750 worked for me without breakup, 600 showed breakup and this is on an i5 desktop machine.
It is unfortunate that there isn't one best size. At 3,000 it was great for having a good margin above the point people would experience breakup when playing from AMPLE scores but with at least 256ms latency it is pretty hard to play from a MIDI keyboard - it is quite likely to be a whole beat behind.
I did start to contemplate what additional delays there may be between handing the buffer off to OpenAL and hearing the sound. The M5000 having its own unique sample rate that is unlikely to match anything else and may well mean software resampling probably isn't helping and maybe that's one reason different CPUs need different amounts of buffering depending on how fast the resampling is. I also don't know if OpenAL is taking time to do 3D audio processing, just with 0s as the input parameters or whether it is clever enough to skip that bit and this could also use CPU and introduce latency.
We could make the buffer size configurable. That shouldn't be that hard, though it looks like it is not as trivial as I had hoped. Another option is to start withy a big buffer and switch down to a smaller one as soon as you play a MIDI note. Any other ideas?