Beispiel #1
0
        public int Offset;  //TODO

        public Fingerprint(int episodeId, SignificantSample sample1, SignificantSample sample2)
        {
            EpisodeId  = episodeId;
            SampleTime = sample1.SampleTime;
            int sampleTimeDelta = (int)(sample2.SampleTime - sample1.SampleTime);

            Hash = ComputeHash(sample1, sample2, sampleTimeDelta);

            Freq1  = sample1.Frequency;
            Amp1   = sample1.Amplitude;
            Freq2  = sample2.Frequency;
            Amp2   = sample2.Amplitude;
            Offset = sampleTimeDelta;
        }
Beispiel #2
0
 private int ComputeHash(SignificantSample sample1, SignificantSample sample2, int sampleTimeOffset)
 {
     return((sample1.FrequencyIdx << 30) | (sample2.FrequencyIdx << 28) | (sampleTimeOffset & 0xFFFFFFF));
 }