Refactoring to use COMPLEX and REAL sample terms throughout

This commit is contained in:
dennis.sheirer
2014-10-31 13:58:20 +00:00
parent 34268f32b3
commit d34abdd2fa
50 changed files with 530 additions and 239 deletions

View File

@@ -0,0 +1,42 @@
package sample.real;
import java.util.Arrays;
public class RealBuffer
{
private float[] mSamples;
/**
* Wrapper around float array containing float samples
*/
public RealBuffer( float[] samples )
{
mSamples = samples;
}
/**
* Creates a deep copy of the buffer
*/
public RealBuffer copyOf()
{
float[] copy = Arrays.copyOf( mSamples, mSamples.length );
return new RealBuffer( copy );
}
/**
* Sample data
*/
public float[] getSamples()
{
return mSamples;
}
/**
* Cleanup method to nullify all data and references
*/
public void dispose()
{
mSamples = null;
}
}