DSPUtil.SoundBuffer.ReadComplex C# (CSharp) Method

ReadComplex() public method

public ReadComplex ( int n, int &nn, bool &moreSamples ) : Complex[][]
n int
nn int
moreSamples bool
return Complex[][]
        public Complex[][] ReadComplex(int n, out int nn, out bool moreSamples)
        {
            if (_cbuff == null || _cbufflen < n)
            {
                _cbuff = new Complex[_nc][];
                for (ushort c = 0; c < _nc; c++)
                {
                    _cbuff[c] = new Complex[n];
                }
                _cbufflen = n;
            }
            else
            {
                for (ushort c = 0; c < _nc; c++)
                {
                    Array.Clear(_cbuff[c], 0, n);
                }
            }

            int nnn = _pos;
            int n4 = nnn + n;
            bool more = ReadTo(n4);
            nn = (more ? n : _samples.Count - nnn);

            //          Trace.WriteLine("CopyTo {0} {1} {2} {3}", _pos, nnn, nn, _samples.Count);
            _samples.CopyTo(nnn, _buff, 0, (int)nn);
            for (int j = 0; j < nn; j++)
            {
                ISample s = _samples[nnn + j];
                for (ushort c = 0; c < _nc; c++)
                {
                    _cbuff[c][j].Re = s[c];
                }
            }

            moreSamples = more;
            _pos += (int)nn;

            return _cbuff;
        }