Internal optimization of sound loop