public void analyseBuffer() {
		AudioBuffer.Segment latestChunk = mBuffer.getLatestChunk();
		double energy = AudioUtils.getEnergy(latestChunk);
		long currentTime = (new Date()).getTime();
		long peakLength = currentTime - peakStart;
		
		if (this.isHigh) {
			if ((energy <= this.lowPass) && (peakLength >= MIN_PEAK_DURATION)) {
				this.isHigh = false;
				peakEnd = (new Date()).getTime();
				onPeak(peakSegment);
			}
			else {
				peakSegment.extend(latestChunk);
			}
		} 
		else 
		{
			if (energy > this.highPass) {
				System.out.println("PEAK STARTED");
				
				this.isHigh = true;
				peakStart = currentTime;
				peakSegment = latestChunk;
			}
			else {
				long timeSincePeak = currentTime - peakEnd;
				if (timeSincePeak >= 2000) {
					onSilence();
					peakEnd = currentTime;
				}
			}
		}
		
	}