Commit a546bfe7 authored by Max Kellermann's avatar Max Kellermann

decoder/wildmidi: support libWildMidi 0.4

parent 25deae6c
ver 0.19.19 (not yet released) ver 0.19.19 (not yet released)
* decoder
- wildmidi: support libWildMidi 0.4
* output * output
- pulse: support 32 bit, 24 bit and floating point playback - pulse: support 32 bit, 24 bit and floating point playback
......
...@@ -68,7 +68,14 @@ wildmidi_finish(void) ...@@ -68,7 +68,14 @@ wildmidi_finish(void)
static DecoderCommand static DecoderCommand
wildmidi_output(Decoder &decoder, midi *wm) 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]; char buffer[4096];
#endif
int length = WildMidi_GetOutput(wm, buffer, sizeof(buffer)); int length = WildMidi_GetOutput(wm, buffer, sizeof(buffer));
if (length <= 0) if (length <= 0)
return DecoderCommand::STOP; return DecoderCommand::STOP;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment