         }
         
         set(position) {
-            let offsetSeconds:TimeInterval = self.trackLength * TimeInterval(position)
+            //avoid position going negative
+            let positionFloor = max(position, 0.0)
+            let offsetSeconds:TimeInterval = self.trackLength * TimeInterval(positionFloor)
             self.trackPosition = offsetSeconds
         }
     }

    }
    
    private func readNextBuffer(buffer:AVAudioPCMBuffer) -> Bool {
        do {
            try self.audioFile?.read(into: buffer)
        } catch let error as NSError {
            print("Exception in buffer read: \(error.localizedDescription)")
        }

        return buffer.frameLength > 0
    }

    //MARK: - Session notificaiton handling

        }
        
        set(seconds) {
            guard let audioFile = self.audioFile else {
                return
            }
            
            let newPosition:AVAudioFramePosition = AVAudioFramePosition(seconds * audioFile.fileFormat.sampleRate)
            
            //if newPosition > audioFile.length then we are scheduling past end of file, allowing this for now as nothing bad happens

            let wasPlaying:Bool = self.isPlaying()
            if wasPlaying {
                _stop()
            }
            
            self.seekPosition = newPosition
            
            if wasPlaying {
                _play()
            }
        }
    }
