Clear() 개인적인 메소드

private Clear ( ) : void
리턴 void
예제 #1
0
        void ResetDecoder(bool isFullReset)
        {
            // this is called when:
            //  - init (true)
            //  - parameter change w/ stream header (true)
            //  - parameter change w/o stream header (false)
            //  - the decoder encounters a "hiccup" in the data stream (false)
            //  - a seek happens (false)

            // save off the existing "good" data
            if (_preparedLength > 0)
            {
                SaveBuffer();
            }
            if (isFullReset)
            {
                _noExecuteChannel = new bool[_channels];
                _floorData        = new VorbisFloor.PacketData[_channels];

                _residue = new float[_channels][];
                for (int i = 0; i < _channels; i++)
                {
                    _residue[i] = new float[Block1Size];
                }

                _outputBuffer          = new RingBuffer(Block1Size * 2 * _channels);
                _outputBuffer.Channels = _channels;
            }
            else
            {
                _outputBuffer.Clear();
            }
            _preparedLength = 0;
        }
예제 #2
0
        void ResetDecoder()
        {
            // this is called when the decoder encounters a "hiccup" in the data stream...
            // it is also called when a seek happens

            // save off the existing "good" data
            if (_preparedLength > 0)
            {
                SaveBuffer();
            }
            _outputBuffer.Clear();
            _preparedLength = 0;
        }
예제 #3
0
 public void ResetDecoder(bool isFullReset)
 {
     if (_preparedLength > 0)
     {
         SaveBuffer();
     }
     if (isFullReset)
     {
         _noExecuteChannel = new bool[_channels];
         _floorData        = new VorbisFloor.PacketData[_channels];
         _residue          = new float[_channels][];
         for (int i = 0; i < _channels; i++)
         {
             _residue[i] = new float[Block1Size];
         }
         _outputBuffer          = new RingBuffer(Block1Size * 2 * _channels);
         _outputBuffer.Channels = _channels;
     }
     else
     {
         _outputBuffer.Clear();
     }
     _preparedLength = 0;
 }