(cherry picked from commit a1105590b13b55ca30d2d4f0fc342035c31d929c - https://jxself.org/git/mmdvm.git)