Audio changing speed during gameplay
<p>So I am making a game in pygame and my problem is that a certain sound effect will play at different speeds. As far as I can tell there are only two speeds that it will play, sometimes it will play normally, and another time it might play noticeably faster.</p>

<p>Here are some sections of my code, I would include more but I can't imagine anywhere else that the problem might be. Any idea what can cause this?</p>

<pre><code>pygame.mixer.pre_init(44000, -16, 2, 512)
pygame.mixer.init()
pygame.init()
</code></pre>

<p>.</p>

<pre><code>rainbowPip = pygame.mixer.Sound('snakey_files/sounds/score up.ogg')
allPips = [redPip,gldPip,dmdPip,crashPip,btnPip,objPip,rainbowPip]
playSound = pygame.mixer.Sound.play
stopSound = pygame.mixer.Sound.stop
</code></pre>

<p>.</p>

<pre><code>    if stats1['chime'] == 'on':
        playSound(rainbowPip, -1, 0, 200)
    elif stats1['chime'] == 'off':
        stopSound(rainbowPip)
</code></pre>

<p>Thanks.</p>