     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)



    func render(buffer:AVAudioPCMBuffer) -> Bool {
        let sampleCount = Int(self.length * UInt64(SampleRate) / 1000)

        if (buffer.format.channelCount != 2) {
            return false;
        }

        if (Int(buffer.frameCapacity) < sampleCount) {
            return false;
        }

        if (self.frequencyBuffer != nil) {
            for (var i = Int(0); i < sampleCount; i++) {
