GAudio.GATData.Clear C# (CSharp) Method

Clear() public method

Clears all audio data
public Clear ( ) : void
return void
        public void Clear()
        {
            System.Array.Clear( _parentArray, _offset, Count );
        }

Same methods

GATData::Clear ( int fromIndex, int length ) : void

Usage Example

Esempio n. 1
0
        protected void FillWithResampledData(GATData sourceData, GATData targetData, int fromIndex, int targetLength, double pitch)
        {
            //check that we have enough samples to fulfill the request:
            int appliedLength = GATMaths.ClampedResampledLength(sourceData.Count - fromIndex, targetLength, pitch);

            if (appliedLength < 0)
            {
                                #if GAT_DEBUG
                Debug.LogWarning("requested offset is out of bounds.");
                                #endif
                return;
            }

            sourceData.ResampleCopyTo(fromIndex, targetData, appliedLength, pitch);

            //if we did not have enough samples, clear the rest:
            if (appliedLength < targetLength)
            {
                targetData.Clear(appliedLength, targetData.Count - appliedLength);
            }
        }
All Usage Examples Of GAudio.GATData::Clear