Pick ringbuffer updates from 2.0
Merge branch 'master' of github.com:LMMS/lmms