Exemple #1
0
        public ChromaContext(int algorithm)
        {
            this.algorithm = algorithm;

            var config = FingerprinterConfiguration.CreateConfiguration(algorithm);

            this.fingerprinter = new Fingerprinter(config);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ChromaContext" /> class.
        /// </summary>
        /// <param name="algorithm">The algorithm to use, see <see cref="ChromaprintAlgorithm" /> (default = TEST2)</param>
        /// <param name="fftService">The FFT service.</param>
        public ChromaContext(ChromaprintAlgorithm algorithm, IFFTService fftService)
        {
            this.Algorithm  = (int)algorithm;
            this.fftService = fftService;

            var config = FingerprinterConfiguration.CreateConfiguration(algorithm);

            this.fingerprinter = new Fingerprinter(config, fftService);
        }