Many improvements for #405, audio repeat.