Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 604528 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-2 / +12 lines)
Lines 12-17 Link Here
12
12
13
namespace
13
namespace
14
{
14
{
15
    // Type declarations of *fprint and *encoded pointers need to account for Chromaprint API version
16
    // (void* -> uint32_t*) and (void* -> char*) changed in versions v1.4.0 or later -- alyptik 12/2016
17
    #if (CHROMAPRINT_VERSION_MINOR > 3) || (CHROMAPRINT_VERSION_MAJOR > 1)
18
        typedef uint32_t* uint32_p;
19
        typedef char* char_p;
20
    #else
21
        typedef void* uint32_p;
22
        typedef void* char_p;
23
    #endif
24
15
    // this is worth 2min of audio
25
    // this is worth 2min of audio
16
    // AcoustID only stores a fingerprint for the first two minutes of a song
26
    // AcoustID only stores a fingerprint for the first two minutes of a song
17
    // on their server so we need only a fingerprint of the first two minutes
27
    // on their server so we need only a fingerprint of the first two minutes
Lines 67-78 namespace Link Here
67
            return QString();
77
            return QString();
68
        }
78
        }
69
79
70
        void* fprint = NULL;
80
        uint32_p fprint = NULL;
71
        int size = 0;
81
        int size = 0;
72
        int ret = chromaprint_get_raw_fingerprint(ctx, &fprint, &size);
82
        int ret = chromaprint_get_raw_fingerprint(ctx, &fprint, &size);
73
        QByteArray fingerprint;
83
        QByteArray fingerprint;
74
        if (ret == 1) {
84
        if (ret == 1) {
75
            void* encoded = NULL;
85
            char_p encoded = NULL;
76
            int encoded_size = 0;
86
            int encoded_size = 0;
77
            chromaprint_encode_fingerprint(fprint, size,
87
            chromaprint_encode_fingerprint(fprint, size,
78
                                           CHROMAPRINT_ALGORITHM_DEFAULT,
88
                                           CHROMAPRINT_ALGORITHM_DEFAULT,
(-)a/src/musicbrainz/chromaprinter.cpp (-2 / +12 lines)
Lines 25-30 Link Here
25
25
26
QString ChromaPrinter::calcFingerPrint(const Mixxx::SoundSourcePointer& pSoundSource) {
26
QString ChromaPrinter::calcFingerPrint(const Mixxx::SoundSourcePointer& pSoundSource) {
27
27
28
    // Type declarations of *fprint and *encoded pointers need to account for Chromaprint API version
29
    // (void* -> uint32_t*) and (void* -> char*) changed in versions v1.4.0 or later -- alyptik 12/2016
30
    #if (CHROMAPRINT_VERSION_MINOR > 3) || (CHROMAPRINT_VERSION_MAJOR > 1)
31
        typedef uint32_t* uint32_p;
32
        typedef char* char_p;
33
    #else
34
        typedef void* uint32_p;
35
        typedef void* char_p;
36
    #endif
37
28
    // this is worth 2min of audio, multiply by 2 because we have 2 channels
38
    // this is worth 2min of audio, multiply by 2 because we have 2 channels
29
    // AcoustID only stores a fingerprint for the first two minutes of a song
39
    // AcoustID only stores a fingerprint for the first two minutes of a song
30
    // on their server so we need only a fingerprint of the first two minutes
40
    // on their server so we need only a fingerprint of the first two minutes
Lines 57-68 Link Here
57
    }
67
    }
58
    chromaprint_finish(ctx);
68
    chromaprint_finish(ctx);
59
69
60
    void* fprint = NULL;
70
    uint32_p fprint = NULL;
61
    int size = 0;
71
    int size = 0;
62
    int ret = chromaprint_get_raw_fingerprint(ctx, &fprint, &size);
72
    int ret = chromaprint_get_raw_fingerprint(ctx, &fprint, &size);
63
    QByteArray fingerprint;
73
    QByteArray fingerprint;
64
    if (ret == 1) {
74
    if (ret == 1) {
65
        void* encoded = NULL;
75
        char_p encoded = NULL;
66
        int encoded_size = 0;
76
        int encoded_size = 0;
67
        chromaprint_encode_fingerprint(fprint, size,
77
        chromaprint_encode_fingerprint(fprint, size,
68
                                       CHROMAPRINT_ALGORITHM_DEFAULT,
78
                                       CHROMAPRINT_ALGORITHM_DEFAULT,

Return to bug 604528