static IEnumerable<ComparisonAgregator> CompareBySamples(WaveReader originalReader, WaveReader compressedReader, long compressedSamplesToSkip)
        {
            var comparisonAgregator = new ComparisonAgregator ("All samples", 0);

            EnumerateBySamples (originalReader, compressedReader, compressedSamplesToSkip, comparisonAgregator.DetermineEquilization);
            EnumerateBySamples (originalReader, compressedReader, compressedSamplesToSkip, comparisonAgregator.CompareSamples);

            comparisonAgregator.WriteResults ();
            yield return comparisonAgregator;
        }
        static IEnumerable<ComparisonAgregator> CompareByFrequencies(WaveReader originalReader, WaveReader compressedReader, float samplingRate, int numChannels, long compressedSamplesToSkip)
        {
            var minWindowSize = samplingRate / 16;
            int windowSize;
            var windowSizeCtr = 0;

            do
            {
                windowSizeCtr++;
                windowSize = Convert.ToInt32(Math.Pow(2, windowSizeCtr));
            } while (windowSize <= minWindowSize);

            var samplesPerCheck = minWindowSize / 2;

            var comparisonAgregators = new Dictionary<int, ComparisonAgregator>();
            for (var ctr = 1; ctr < windowSize / 2; ctr++)
            {
                var lowerFrequency = (ctr - 1) * samplingRate / windowSize;
                var frequency = ctr * samplingRate / windowSize;

                if (frequency >= 16)
                    comparisonAgregators[ctr - 1] = new ComparisonAgregator(lowerFrequency.ToString() + "hz", lowerFrequency);
            }

            comparisonAgregators[windowSize / 2] = new ComparisonAgregator((samplingRate / 2).ToString() + "hz", samplingRate / 2);

            var equilizationMethods = new Dictionary<int, Action<float[], float[]>>();
            foreach (var kvp in comparisonAgregators)
                equilizationMethods[kvp.Key] = kvp.Value.DetermineEquilization;
            EnumerateByFrequencies (originalReader, compressedReader, numChannels, windowSize, samplesPerCheck, equilizationMethods, compressedSamplesToSkip);

            var comparisonMethods = new Dictionary<int, Action<float[], float[]>>();
            foreach (var kvp in comparisonAgregators)
                comparisonMethods[kvp.Key] = kvp.Value.CompareSamples;
            EnumerateByFrequencies (originalReader, compressedReader, numChannels, windowSize, samplesPerCheck, comparisonMethods, compressedSamplesToSkip);

            foreach (var compressionAgregator in comparisonAgregators.OrderBy(kvp => kvp.Key).Select(kvp => kvp.Value))
                compressionAgregator.WriteResults();

            return comparisonAgregators.Values;
        }
        static IEnumerable<ComparisonAgregator> CompareByFrequencyBands(WaveReader originalReader, WaveReader compressedReader, long compressedSamplesToSkip)
        {
            var highComparisonAgregator = new ComparisonAgregator ("High Frequencies: > 6khz", 0);
            var midComparisonAgregator = new ComparisonAgregator ("Mid Frequencies: < 6khz, > 3khz", 1);
            var lowComparisonAgregator = new ComparisonAgregator ("Low Frequencies: < 3khz", 2);

            EnumerateByFrequencyBands (
                originalReader,
                compressedReader,
                compressedSamplesToSkip,
                highComparisonAgregator.DetermineEquilization,
                midComparisonAgregator.DetermineEquilization,
                lowComparisonAgregator.DetermineEquilization);

            EnumerateByFrequencyBands (
                originalReader,
                compressedReader,
                compressedSamplesToSkip,
                highComparisonAgregator.CompareSamples,
                midComparisonAgregator.CompareSamples,
                lowComparisonAgregator.CompareSamples);

            lowComparisonAgregator.WriteResults ();
            midComparisonAgregator.WriteResults ();
            highComparisonAgregator.WriteResults ();

            yield return lowComparisonAgregator;
            yield return midComparisonAgregator;
            yield return highComparisonAgregator;
        }