Inheritance: SoundObj
Exemple #1
0
 public OverlappingWindows(ISoundObj input, int length, double overlap, CosWindow window)
 {
     _input   = input;
     _length  = length;
     _overlap = overlap;
     _window  = window;
 }
Exemple #2
0
 public OverlappingWindows(ISoundObj input, int length, double overlap, CosWindow window)
 {
     _input = input;
     _length = length;
     _overlap = overlap;
     _window = window;
 }
Exemple #3
0
 public OverlappingWindows(ISoundObj input, int length)
 {
     _input   = input;
     _length  = length;
     _overlap = 0.5;
     _window  = new Hamming(length / 2, length / 2);
 }
Exemple #4
0
 public OverlappingWindows(ISoundObj input, int length)
 {
     _input = input;
     _length = length;
     _overlap = 0.5;
     _window = new Hamming(length / 2, length / 2);
 }
Exemple #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;
            }
        }
Exemple #6
0
 public WindowedBuffer(ISoundObj input, CosWindow window, int start, int count)
 {
     _buff = new SoundBuffer(new SampleBuffer(input).Subset(start, count));
     _buff.ApplyWindow(window);
 }
Exemple #7
0
 public WindowedBuffer(ISoundObj input, CosWindow window, int start, int count)
 {
     _buff = new SoundBuffer(new SampleBuffer(input).Subset(start, count));
     _buff.ApplyWindow(window);
 }
Exemple #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;
     }
 }