Code example for Allocation

Methods: copy2DRangeFromcopyTo

0
		 
		//Compute Discrete Cosine transform  
		computeDCT.forEach_root(fftOut, mDCTY);
		 
		//Compute Mel Ceps 
		mMelCeps.copy2DRangeFrom(0, 0, 1, numFrames, mSumPowerInFreq, 0, 0);
		mMelCeps.copy2DRangeFrom(1, 0, nCeps, numFrames, mDCTY, 1, 0);
 
		float[] debug = new float[(nCeps+1)*numFrames];
		mMelCeps.copyTo(debug);
	} 
	 
	//This is the pre-emphasis filter that was used for the input data in matlab 
	private float[] emphData(float[] data, float emph){
		float[] tmpData = new float[data.length];
		 
		tmpData[0] = data[0];
		for (int i = 1; i < data.length; ++i){
			tmpData[i] = data[i] - emph * data[i-1];
		} 
		return tmpData;