Inheritance: SoundObj
Exemplo n.º 1
0
 public OverlappingWindows(ISoundObj input, int length, double overlap, CosWindow window)
 {
     _input   = input;
     _length  = length;
     _overlap = overlap;
     _window  = window;
 }
Exemplo n.º 2
0
 public OverlappingWindows(ISoundObj input, int length, double overlap, CosWindow window)
 {
     _input = input;
     _length = length;
     _overlap = overlap;
     _window = window;
 }
Exemplo n.º 3
0
 public OverlappingWindows(ISoundObj input, int length)
 {
     _input   = input;
     _length  = length;
     _overlap = 0.5;
     _window  = new Hamming(length / 2, length / 2);
 }
Exemplo n.º 4
0
 public OverlappingWindows(ISoundObj input, int length)
 {
     _input = input;
     _length = length;
     _overlap = 0.5;
     _window = new Hamming(length / 2, length / 2);
 }
Exemplo n.º 5
0
        /// <summary>
        /// Apply a window to the whole buffer.
        /// </summary>
        /// <param name="window">Cosine-based window to apply</param>
        public void ApplyWindow(CosWindow window)
        {
            window.Input = new CallbackSource(NumChannels, SampleRate, delegate(long j)
            {
                if (j >= _samples.Count)
                {
                    return(null);
                }
                return(_samples[(int)j]);
            });
            int n = 0;

            foreach (Sample s in window)
            {
                _samples[n++] = s;
            }
        }
Exemplo n.º 6
0
 public WindowedBuffer(ISoundObj input, CosWindow window, int start, int count)
 {
     _buff = new SoundBuffer(new SampleBuffer(input).Subset(start, count));
     _buff.ApplyWindow(window);
 }
Exemplo n.º 7
0
 public WindowedBuffer(ISoundObj input, CosWindow window, int start, int count)
 {
     _buff = new SoundBuffer(new SampleBuffer(input).Subset(start, count));
     _buff.ApplyWindow(window);
 }
Exemplo n.º 8
0
 /// <summary>
 /// Apply a window to the whole buffer.
 /// </summary>
 /// <param name="window">Cosine-based window to apply</param>
 public void ApplyWindow(CosWindow window)
 {
     window.Input = new CallbackSource(NumChannels, SampleRate, delegate(long j)
     {
         if (j >= _samples.Count)
         {
             return null;
         }
         return _samples[(int)j];
     });
     int n=0;
     foreach (Sample s in window)
     {
         _samples[n++] = s;
     }
 }