Exemplo n.º 1
0
        public void pad_left()
        {
            // Pad with 0s at the beginning until total length%16==0
            if (length % 16 != 0)
            {
                int old_length = length;
                int new_length = length + 16 - length % 16;
                for (int i = old_length; i < new_length; i++)
                {
                    add_sample_point(new SamplePoint(0, 0));
                }
                for (int i = new_length - 1; i >= new_length - old_length; i--)
                {
                    _sample_data[i] = _sample_data[i - (new_length - old_length)];
                }
                for (int i = 0; i < new_length - old_length; i++)
                {
                    _sample_data[i] = new SamplePoint(0, 0);
                }

                //show_debug("{0}", _loop_start);
                loop_end    = new_length;
                loop_start += new_length - old_length;

                //show_debug("{0} {1} {2} {3} {4}", old_length, new_length, length, loop_start, loop_end);
            }
        }
Exemplo n.º 2
0
 public void add_sample_point(SamplePoint sp)
 {
     _sample_data.Add(sp);
 }