diff --git a/libse/RealFFT.cs b/libse/RealFFT.cs index 06ebc0ad5..b06437083 100644 --- a/libse/RealFFT.cs +++ b/libse/RealFFT.cs @@ -8,9 +8,9 @@ namespace Nikse.SubtitleEdit.Core { public class RealFFT { - private int _length; - private int[] _ip; - private double[] _w; + private readonly int _length; + private readonly int[] _ip; + private readonly double[] _w; public readonly double ForwardScaleFactor; public readonly double ReverseScaleFactor; diff --git a/libse/WaveToVisualizer.cs b/libse/WaveToVisualizer.cs index 4f2df823c..8b4645a41 100644 --- a/libse/WaveToVisualizer.cs +++ b/libse/WaveToVisualizer.cs @@ -505,13 +505,13 @@ namespace Nikse.SubtitleEdit.Core { private const double raisedCosineWindowScale = 0.5; - private int _nfft; - private MagnitudeToIndexMapper _mapper; - private RealFFT _fft; - private FastBitmap.PixelData[] _palette; - private double[] _segment; - private double[] _window; - private double[] _magnitude; + private readonly int _nfft; + private readonly MagnitudeToIndexMapper _mapper; + private readonly RealFFT _fft; + private readonly FastBitmap.PixelData[] _palette; + private readonly double[] _segment; + private readonly double[] _window; + private readonly double[] _magnitude; public SpectrogramDrawer(int nfft) {