diff options
author | Max Kellermann <max@duempel.org> | 2013-09-27 12:11:37 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-09-27 12:11:37 +0200 |
commit | c5d05ac0cf18dbd3d04534de240c437f8b07bd28 (patch) | |
tree | 5e69c019f69cc6f2f1d99c71448338d855bf4898 /src/decoder/WildmidiDecoderPlugin.cxx | |
parent | 939003c1f1a8ed9f6e3fe677a63e1686fe35d929 (diff) | |
download | mpd-c5d05ac0cf18dbd3d04534de240c437f8b07bd28.tar.gz mpd-c5d05ac0cf18dbd3d04534de240c437f8b07bd28.tar.xz mpd-c5d05ac0cf18dbd3d04534de240c437f8b07bd28.zip |
DecoderCommand: convert to strictly-typed enum
Diffstat (limited to '')
-rw-r--r-- | src/decoder/WildmidiDecoderPlugin.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/decoder/WildmidiDecoderPlugin.cxx b/src/decoder/WildmidiDecoderPlugin.cxx index daa0e0cc9..3a057ca2c 100644 --- a/src/decoder/WildmidiDecoderPlugin.cxx +++ b/src/decoder/WildmidiDecoderPlugin.cxx @@ -72,7 +72,6 @@ wildmidi_file_decode(struct decoder *decoder, const char *path_fs) }; midi *wm; const struct _WM_Info *info; - enum decoder_command cmd; wm = WildMidi_Open(path_fs); if (wm == nullptr) @@ -87,6 +86,7 @@ wildmidi_file_decode(struct decoder *decoder, const char *path_fs) decoder_initialized(decoder, audio_format, true, info->approx_total_samples / WILDMIDI_SAMPLE_RATE); + DecoderCommand cmd; do { char buffer[4096]; int len; @@ -101,7 +101,7 @@ wildmidi_file_decode(struct decoder *decoder, const char *path_fs) cmd = decoder_data(decoder, nullptr, buffer, len, 0); - if (cmd == DECODE_COMMAND_SEEK) { + if (cmd == DecoderCommand::SEEK) { unsigned long seek_where = WILDMIDI_SAMPLE_RATE * decoder_seek_where(decoder); @@ -111,10 +111,10 @@ wildmidi_file_decode(struct decoder *decoder, const char *path_fs) WildMidi_FastSeek(wm, &seek_where); #endif decoder_command_finished(decoder); - cmd = DECODE_COMMAND_NONE; + cmd = DecoderCommand::NONE; } - } while (cmd == DECODE_COMMAND_NONE); + } while (cmd == DecoderCommand::NONE); WildMidi_Close(wm); } |