The sound is a looping sound with no silence. The glitch happens in the middle of the sound not at the end and immediately when the mode is changed.
It’s on OSX 10.9. The problem does not happen with wav files. It happens with mp3 files when opened with FMOD_CREATECOMPRESSEDSAMPLE.