Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
chromaprint.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: © 2020-2021 Alexandros Theodotou <alex@zrythm.org>
3 *
4 * SPDX-License-Identifier: LicenseRef-ZrythmLicense
5 */
6
12
13#ifndef __UTILS_CHROMAPRINT_H__
14#define __UTILS_CHROMAPRINT_H__
15
16#include "zrythm-config.h"
17
18#if HAVE_CHROMAPRINT
19
20# include "utils/types.h"
21
22# include <chromaprint.h>
23
29
33struct ChromaprintFingerprint
34{
35 ChromaprintFingerprint () noexcept = default;
36 ~ChromaprintFingerprint ()
37 {
38 if (fp)
39 chromaprint_dealloc (fp);
40 if (compressed_str)
41 chromaprint_dealloc (compressed_str);
42 }
43 uint32_t * fp;
44 int size;
45 char * compressed_str;
46};
47
48std::unique_ptr<ChromaprintFingerprint>
49z_chromaprint_get_fingerprint (const char * file1, unsigned_frame_t max_frames);
50
55void
56z_chromaprint_check_fingerprint_similarity (
57 const char * file1,
58 const char * file2,
59 int perc,
60 int expected_size);
61
65
66#endif /* HAVE_CHROMAPRINT */
67
68#endif /* header guard */
Chromaprint utils.
uint_fast64_t unsigned_frame_t
Unsigned type for frame index.
Definition types.h:78