     private func renderFadeIn(wantedStart:UInt32) {
         let sampleCount = UInt32(self.length * UInt64(SampleRate) / 1000)
 
-        if (self.volumeBuffer?.frameLength < sampleCount) {
-            resetVolume()
-        }
-
         if (wantedStart >= sampleCount) {
             return
         }

    private func renderFadeOut(wantedStart:UInt32) {
        let sampleCount = UInt32(self.length * UInt64(SampleRate) / 1000)

        if (self.volumeBuffer?.frameLength < sampleCount) {
            resetVolume()
        }

        let start:Int = wantedStart > fadeSampleCount ? Int(wantedStart - fadeSampleCount) : 0
        var count:Int = wantedStart > fadeSampleCount ? Int(fadeSampleCount) : Int(start)


        for (var i = 0; i < count; i++) {
            self.volumeBuffer?.floatChannelData.memory[start +  i] *= Float(1) - (Float(i) / Float(count))
        }
    }

    private func renderFrequencies() {
        let sampleCount = UInt32(self.length * UInt64(SampleRate) / 1000)

        self.frequencyBuffer = getBuffer()

        if (self.volumeBuffer == nil || self.volumeBuffer?.frameCapacity < sampleCount) {
            resetVolume()
        }

        let sectionLength = lengthOfSections(sampleCount, sequence: self.toneSequence)

