예제 #1
0
        public void Test2SilenceRawFp()
        {
            short[] zeroes = new short[1024];

            var ctx = new NativeChromaContext();

            ctx.Start(44100, 1);

            for (int i = 0; i < 130; i++)
            {
                ctx.Feed(zeroes, 1024);
            }

            ctx.Finish();

            int[] fp = ctx.GetRawFingerprint();

            Assert.AreEqual(3, fp.Length);
            Assert.AreEqual(627964279, fp[0]);
            Assert.AreEqual(627964279, fp[1]);
            Assert.AreEqual(627964279, fp[2]);

            ctx.Dispose();
        }
예제 #2
0
        public void Test2SilenceFp()
        {
            short[] zeroes = new short[1024];

            var ctx = new NativeChromaContext();

            ctx.Start(44100, 1);

            for (int i = 0; i < 130; i++)
            {
                ctx.Feed(zeroes, 1024);
            }

            ctx.Finish();

            string fp   = ctx.GetFingerprint();
            int    hash = ctx.GetFingerprintHash();

            Assert.AreEqual(18, fp.Length);
            Assert.AreEqual("AQAAA0mUaEkSRZEGAA", fp);
            Assert.AreEqual(627964279, hash);

            ctx.Dispose();
        }