DSPUtil.SoundBuffer.ToArray C# (CSharp) Method

ToArray() public method

public ToArray ( int startPos, int count ) : ISample[]
startPos int
count int
return ISample[]
        public ISample[] ToArray(int startPos, int count)
        {
            int n = count;
            if (count < 0)
            {
                ReadAll();
                n = _samples.Count - startPos;
            }
            else
            {
                ReadTo(startPos + count);
                n = Math.Min(startPos + count, _samples.Count);
            }
            ISample[] ret = new ISample[n];
            for (int j = startPos; j - startPos < n; j++)
            {
                ret[j - startPos] = _samples[j];
            }
            return ret;
        }

Same methods

SoundBuffer::ToArray ( ) : ISample[]
SoundBuffer::ToArray ( int startPos ) : ISample[]