diff options
author | Max Kellermann <max.kellermann@gmail.com> | 2016-08-15 10:08:35 +0200 |
---|---|---|
committer | Max Kellermann <max.kellermann@gmail.com> | 2016-08-15 10:08:35 +0200 |
commit | a546bfe7d998274bf936225aa89b05cd46cb0888 (patch) | |
tree | 14a27c97cfbb1dfcbff02c522b81e3f317f03da5 /src/decoder | |
parent | 25deae6cc7cb49ee02278509c7904d3efc69a00b (diff) |
decoder/wildmidi: support libWildMidi 0.4
Diffstat (limited to 'src/decoder')
-rw-r--r-- | src/decoder/plugins/WildmidiDecoderPlugin.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/decoder/plugins/WildmidiDecoderPlugin.cxx b/src/decoder/plugins/WildmidiDecoderPlugin.cxx index 1c18860b4..e5dbabe46 100644 --- a/src/decoder/plugins/WildmidiDecoderPlugin.cxx +++ b/src/decoder/plugins/WildmidiDecoderPlugin.cxx @@ -68,7 +68,14 @@ wildmidi_finish(void) static DecoderCommand wildmidi_output(Decoder &decoder, midi *wm) { +#ifdef LIBWILDMIDI_VER_MAJOR + /* WildMidi 0.4 has switched from "char*" to "int8_t*" */ + int8_t buffer[4096]; +#else + /* pre 0.4 */ char buffer[4096]; +#endif + int length = WildMidi_GetOutput(wm, buffer, sizeof(buffer)); if (length <= 0) return DecoderCommand::STOP; |