コード例 #1
0
        public void SetSize(int numChannels, int numSamples)
        {
            if (numChannels > _numChannels || numSamples > _numSamples || _allocatedBlock == FloatHeapBlock.Zero)
            {
                _allocatedBlock.Dispose();
                _numSamples  = numSamples;
                _numChannels = numChannels;

                var size = numChannels * numSamples;
                if (size > 0)
                {
                    _allocatedBlock = new FloatHeapBlock(size);

                    _channels = new float *[numChannels];
                    for (var i = 0; i < numChannels; ++i)
                    {
                        _channels[i] = _allocatedBlock + i * _numSamples;
                    }
                }
                else
                {
                    _channels = null;
                }
            }
        }
コード例 #2
0
 public bool Equals(FloatHeapBlock other)
 {
     return(this == other);
 }