GAudio.GATData.GetPointer C# (CSharp) Method

GetPointer() public method

Gets an IntPtr pointer to the parent array. Only valid for GATData instances obtained through GATManager.GetDataContainer calls.
public GetPointer ( ) : IntPtr
return System.IntPtr
        public virtual System.IntPtr GetPointer()
        {
            return IntPtr.Zero;
        }

Usage Example

        /// <summary>
        /// The splitter will begin broadcasting it's
        /// sub streams immediately.
        /// </summary>
        public GATAudioThreadStreamSplitter(IGATAudioThreadStream stream, GATDataAllocationMode bufferAllocationMode)
        {
            int i;

            _sourceStreamChannels = stream.NbOfChannels;
            if (_sourceStreamChannels < 2)
            {
                Debug.LogWarning("source stream is mono: " + stream.StreamName);
            }

            IntPtr outputBufferPointer = IntPtr.Zero;

            _sharedBufferSize = stream.BufferSizePerChannel;


            if (bufferAllocationMode == GATDataAllocationMode.Unmanaged)
            {
                _sharedBufferArray = new float[_sharedBufferSize];
                _sharedBuffer      = new GATData(_sharedBufferArray);
            }
            else
            {
                if (bufferAllocationMode == GATDataAllocationMode.Fixed)
                {
                    _sharedBuffer = GATManager.GetFixedDataContainer(_sharedBufferSize, "StreamSplitter buffer");
                }
                else
                {
                    _sharedBuffer = GATManager.GetDataContainer(_sharedBufferSize);
                }

                _sharedBufferArray  = _sharedBuffer.ParentArray;
                outputBufferPointer = _sharedBuffer.GetPointer();
            }

            _memOffset = _sharedBuffer.MemOffset;

            _streamProxies = new GATAudioThreadStreamProxy[_sourceStreamChannels];

            for (i = 0; i < _sourceStreamChannels; i++)
            {
                _streamProxies[i] = new GATAudioThreadStreamProxy(_sharedBufferSize, 1, outputBufferPointer, _sharedBuffer.MemOffset, (stream.StreamName + " split " + i));
            }

            stream.AddAudioThreadStreamClient(this);

            _sourceStream = stream;
        }
All Usage Examples Of GAudio.GATData::GetPointer