Logo Search packages:      
Sourcecode: libjlayer-java version File versions  Download package

static float [][] javazoom::jl::decoder::SynthesisFilter::splitArray ( final float[]  array,
final int  blockSize 
) [inline, static, private]

Converts a 1D array into a number of smaller arrays. This is used to achieve offset + constant indexing into an array. Each sub-array represents a block of values of the original array.

Parameters:
array The array to split up into blocks.
blockSize The size of the blocks to split the array into. This must be an exact divisor of the length of the array, or some data will be lost from the main array.
Returns:
An array of arrays in which each element in the returned array will be of length blockSize.

Definition at line 1643 of file SynthesisFilter.java.

References subArray().

Referenced by SynthesisFilter().

      {
            int size = array.length / blockSize;
            float[][] split = new float[size][];
            for (int i=0; i<size; i++)
            {
                  split[i] = subArray(array, i*blockSize, blockSize);
            }
            return split;
      }


Generated by  Doxygen 1.6.0   Back to index