diff --git a/NEWS b/NEWS
index 9b9ceadef..5ab83d1e7 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,6 @@
 ver 0.19.19 (not yet released)
+* decoder
+  - wildmidi: support libWildMidi 0.4
 * output
   - pulse: support 32 bit, 24 bit and floating point playback
 
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;