aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/GmeDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-09-27 12:11:37 +0200
committerMax Kellermann <max@duempel.org>2013-09-27 12:11:37 +0200
commitc5d05ac0cf18dbd3d04534de240c437f8b07bd28 (patch)
tree5e69c019f69cc6f2f1d99c71448338d855bf4898 /src/decoder/GmeDecoderPlugin.cxx
parent939003c1f1a8ed9f6e3fe677a63e1686fe35d929 (diff)
downloadmpd-c5d05ac0cf18dbd3d04534de240c437f8b07bd28.tar.gz
mpd-c5d05ac0cf18dbd3d04534de240c437f8b07bd28.tar.xz
mpd-c5d05ac0cf18dbd3d04534de240c437f8b07bd28.zip
DecoderCommand: convert to strictly-typed enum
Diffstat (limited to '')
-rw-r--r--src/decoder/GmeDecoderPlugin.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/decoder/GmeDecoderPlugin.cxx b/src/decoder/GmeDecoderPlugin.cxx
index cc31c6bab..dbe1d000f 100644
--- a/src/decoder/GmeDecoderPlugin.cxx
+++ b/src/decoder/GmeDecoderPlugin.cxx
@@ -174,7 +174,7 @@ gme_file_decode(struct decoder *decoder, const char *path_fs)
gme_set_fade(emu, ti->length);
/* play */
- enum decoder_command cmd;
+ DecoderCommand cmd;
do {
short buf[GME_BUFFER_SAMPLES];
gme_err = gme_play(emu, GME_BUFFER_SAMPLES, buf);
@@ -184,7 +184,7 @@ gme_file_decode(struct decoder *decoder, const char *path_fs)
}
cmd = decoder_data(decoder, nullptr, buf, sizeof(buf), 0);
- if (cmd == DECODE_COMMAND_SEEK) {
+ if (cmd == DecoderCommand::SEEK) {
float where = decoder_seek_where(decoder);
gme_err = gme_seek(emu, int(where * 1000));
if (gme_err != nullptr)
@@ -194,7 +194,7 @@ gme_file_decode(struct decoder *decoder, const char *path_fs)
if (gme_track_ended(emu))
break;
- } while (cmd != DECODE_COMMAND_STOP);
+ } while (cmd != DecoderCommand::STOP);
gme_free_info(ti);
gme_delete(emu);