public void addSamples(int[] samples, int length) {
		int distToEnd;
		
		if (mPointer + length >= raw_data.length) {
			distToEnd = raw_data.length-mPointer;
			System.arraycopy(samples, 0, raw_data, mPointer, distToEnd);
			System.arraycopy(samples, distToEnd, raw_data, 0, length-distToEnd);
		}
		else {
			System.arraycopy(samples, 0, raw_data, mPointer, length);
		}
		
		if (lowPassFilterOn) {
			for (int i=0; i<length; i++) {
				if (raw_data[mPointer+i] < lowPassFilterValue) {
					raw_data[mPointer+i] = 0;
				}
				//raw_data[mPointer+i] = Math.max(0,raw_data[mPointer+i]-lowPassFilterValue);
			}
		}
		
		mPointer += length;
		if (mPointer >= raw_data.length) {
			mPointer -= raw_data.length;
		}
		
		for (AudioBufferListener l : mListeners) {
			l.onSamplesAdded(length);
		}
	}