BSoundPlayer sends buffers late, with ever-increasing latency
|Reported by:||Pete||Owned by:||jua|
Once I got sound working reliably on my machine (see #7284) I was able to try apps like SqueekySynth and MidiPlayer, but I immediately ran into "Buffer Late" problems there.
Often the app will start up OK, and I can drive it from a midifile or live input with marvellously low latency. Shortly, however, the whole OS will get very sluggish, and sould usually quits altogether. This seems to be usually triggered by mouse action, such as clicking a radio button.
If I run 'top', I see the audio mixer hogging up to 80% of CPU. Looking at 'tail -F /var/log/syslog', there are continuous "Buffer late" messages with ever-increasing lag. (I've seen something like 28 million microsecs if I let it go long enough!)
Once I terminate the app, things go back to normal, but the same thing will happen the next time round.
I can prevent it happening at all by using Cortex to change the run mode of the app to 'drop frames', rather than 'increase latency' but I imagine this isn't the correct solution. MediaPlayer, which seems to have a slightly different buffer management scheme, never shows the problem, however hard I work the mouse buttons.
(I'm still looking into this, but I wanted to get it into a ticket before any possible alpha deadline.)