Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/shazamio/ShazamIO
Browse files Browse the repository at this point in the history
  • Loading branch information
dotX12 committed Feb 18, 2024
2 parents 1e7c2aa + 72af495 commit 67808f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions shazamio/algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ def process_input(self, s16le_mono_samples: List[int]):

def do_fft(self, batch_of_128_s16le_mono_samples):
type_ring = self.ring_buffer_of_samples.position + len(batch_of_128_s16le_mono_samples)
self.ring_buffer_of_samples[
self.ring_buffer_of_samples.position : type_ring
] = batch_of_128_s16le_mono_samples
self.ring_buffer_of_samples[self.ring_buffer_of_samples.position : type_ring] = (
batch_of_128_s16le_mono_samples
)
self.ring_buffer_of_samples.position += len(batch_of_128_s16le_mono_samples)
self.ring_buffer_of_samples.position %= 2048
self.ring_buffer_of_samples.num_written += len(batch_of_128_s16le_mono_samples)
Expand Down
2 changes: 1 addition & 1 deletion shazamio/signature.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class RawSignatureHeader(LittleEndianStructure):
# field above,
# it can be inferred and subtracted so that we obtain the number of samples,
# and from the number of samples and sample rate we can obtain the length of the recording
("fixed_value", c_uint32)
("fixed_value", c_uint32),
# Calculated as ((15 << 19) + 0x40000) - 0x7c0000 or 00 00 7c 00 - seems pretty constant,
# may be different in the "SigType.STREAMING" mode
]
Expand Down

0 comments on commit 67808f7

Please sign in to comment.