From 1ab852b1290114b4c9ce06da6cdfd7147d9c7964 Mon Sep 17 00:00:00 2001 From: Ciumac Sergiu Date: Tue, 29 Nov 2016 12:05:55 +0200 Subject: [PATCH] New file generates 1 fingerprint less, probably because of silence at the beginning. --- .../Integration/FingerprintCommandBuilderIntTest.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/SoundFingerprinting.SQL.Tests/Integration/FingerprintCommandBuilderIntTest.cs b/src/SoundFingerprinting.SQL.Tests/Integration/FingerprintCommandBuilderIntTest.cs index 67ffb21..766c8eb 100644 --- a/src/SoundFingerprinting.SQL.Tests/Integration/FingerprintCommandBuilderIntTest.cs +++ b/src/SoundFingerprinting.SQL.Tests/Integration/FingerprintCommandBuilderIntTest.cs @@ -64,8 +64,7 @@ public void CreateFingerprintsFromDefaultFileAndAssertNumberOfFingerprints() .UsingServices(bassAudioService); double seconds = tagService.GetTagInfo(PathToMp3).Duration; - int samples = (int)(seconds * fingerprintCommand.FingerprintConfiguration.SampleRate); - int expectedFingerprints = (samples / StaticStride) - 1; + int expectedFingerprints = (int)(seconds * fingerprintCommand.FingerprintConfiguration.SampleRate / StaticStride * StaticStride / StaticStride) - 2; // ? new file generates 1 fingerprint less; var fingerprints = ((FingerprintCommand)fingerprintCommand).Fingerprint().Result;