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/ModplugDecoderPlugin.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 'src/decoder/ModplugDecoderPlugin.cxx')
-rw-r--r-- | src/decoder/ModplugDecoderPlugin.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/decoder/ModplugDecoderPlugin.cxx b/src/decoder/ModplugDecoderPlugin.cxx index d6840300c..9cbf44b15 100644 --- a/src/decoder/ModplugDecoderPlugin.cxx +++ b/src/decoder/ModplugDecoderPlugin.cxx @@ -99,7 +99,6 @@ mod_decode(struct decoder *decoder, struct input_stream *is) GByteArray *bdatas; int ret; char audio_buffer[MODPLUG_FRAME_SIZE]; - enum decoder_command cmd = DECODE_COMMAND_NONE; bdatas = mod_loadfile(decoder, is); @@ -131,6 +130,7 @@ mod_decode(struct decoder *decoder, struct input_stream *is) is->IsSeekable(), ModPlug_GetLength(f) / 1000.0); + DecoderCommand cmd; do { ret = ModPlug_Read(f, audio_buffer, MODPLUG_FRAME_SIZE); if (ret <= 0) @@ -140,7 +140,7 @@ mod_decode(struct decoder *decoder, struct input_stream *is) audio_buffer, ret, 0); - if (cmd == DECODE_COMMAND_SEEK) { + if (cmd == DecoderCommand::SEEK) { float where = decoder_seek_where(decoder); ModPlug_Seek(f, (int)(where * 1000.0)); @@ -148,7 +148,7 @@ mod_decode(struct decoder *decoder, struct input_stream *is) decoder_command_finished(decoder); } - } while (cmd != DECODE_COMMAND_STOP); + } while (cmd != DecoderCommand::STOP); ModPlug_Unload(f); } |