Fix SamplePlayer::loop for samples with different sample rates