decoder/wildmidi: support libWildMidi 0.4
This commit is contained in:
parent
25deae6cc7
commit
a546bfe7d9
2
NEWS
2
NEWS
@ -1,4 +1,6 @@
|
|||||||
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)
|
|||||||
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user