DSPUtil.SoundBuffer.ApplyWindow C# (CSharp) Method

ApplyWindow() public method

Apply a window to the whole buffer.
public ApplyWindow ( CosWindow window ) : void
window CosWindow Cosine-based window to apply
return void
        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;
            }
        }

Usage Example

Exemplo n.º 1
0
 public WindowedBuffer(ISoundObj input, CosWindow window, int start, int count)
 {
     _buff = new SoundBuffer(new SampleBuffer(input).Subset(start, count));
     _buff.ApplyWindow(window);
 }
All Usage Examples Of DSPUtil.SoundBuffer::ApplyWindow