Skip to content

Commit

Permalink
[MZ] Compatibility with Chromaprint ≥ 1.4.
Browse files Browse the repository at this point in the history
Why change API in such a way?
  • Loading branch information
0xd34df00d committed Jan 5, 2017
1 parent 37d1177 commit 14f5f88
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/plugins/musiczombie/chroma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,13 @@ namespace MusicZombie
data = frame->data;

auto length = std::min (remaining, frame->nb_samples * codecCtx->channels);
if (!chromaprint_feed (Ctx_, data [0], length))
if (!chromaprint_feed (Ctx_,
#if CHROMAPRINT_VERSION_MAJOR > 1 || CHROMAPRINT_VERSION_MINOR >= 4
reinterpret_cast<const int16_t*> (data [0]),
#else
data [0],
#endif
length))
throw std::runtime_error ("cannot feed data");

bool finished = false;
Expand Down

0 comments on commit 14f5f88

Please sign in to comment.