How to do Python Fade out?
<pre><code>def fade_out (snd, fade_length):
    new_snd = sound.copy(snd)
    factor = 1.0


    for sample in new_snd:
        snd_samp = sound.get_sample(snd, snd_index)
        snd_index = sound.get_index(sample)
        if snd_index &gt;= fade_length:
            left = (sound.get_left(snd_samp) * factor)
            right = (sound.get_right(snd_samp) * factor)
            factor -= 0.25
            sound.set_values(sample,int(left),int(right))
        else:
            left = sound.get_left(sample)
            right = sound.get_right(sample)
            sound.set_values(sample, int(left), int(right))

    return new_snd
</code></pre>

<p>i cant find anything wrong with it. but it just not passing in python. neeed help~!</p>
