How do I change the typecast of an array of floats into an array of shorts with a one-to-one correspondence? i.e.
int bufferSize = 256;
short[] myShort = new short[bufferSize];
float[] myFloat = new float[bufferSize];
for(int i=0;i<bufferSize;i++){
myShort[i] = (short) myFloat[i];
}
I'm looking for a more compact, simpler code. I'm really short on processing time (no pun intended).