GAudio.GATData.Reverse C# (CSharp) Method

Reverse() public method

Reverses the entire audio data.
public Reverse ( ) : void
return void
        public void Reverse()
        {
            System.Array.Reverse( _parentArray, _offset, Count );
        }

Same methods

GATData::Reverse ( int offset, int length ) : void

Usage Example

Esempio n. 1
0
        public int GetData(GATData target, int targetLength, int offsetInTarget, bool reverse = false)
        {
            int nextIndex = ( int )_nextIndex;
            int sign      = reverse ? -1 : 1;
            int lastIndex = nextIndex + targetLength * sign;

            if (lastIndex >= _data.Count)
            {
                targetLength = _data.Count - nextIndex;
            }
            else if (lastIndex < 0)
            {
                targetLength = nextIndex + 1;
                lastIndex    = 0;
            }

            if (reverse == false)
            {
                target.CopyFrom(_data.ParentArray, offsetInTarget, nextIndex + _data.MemOffset, targetLength);
            }
            else
            {
                target.CopyFrom(_data.ParentArray, offsetInTarget, lastIndex + _data.MemOffset, targetLength);
                target.Reverse(offsetInTarget, targetLength);
            }

            _nextIndex = ( int )lastIndex;

            return(targetLength);
        }
All Usage Examples Of GAudio.GATData::Reverse