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