aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/MpcdecDecoderPlugin.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/MpcdecDecoderPlugin.cxx
parent939003c1f1a8ed9f6e3fe677a63e1686fe35d929 (diff)
downloadmpd-c5d05ac0cf18dbd3d04534de240c437f8b07bd28.tar.gz
mpd-c5d05ac0cf18dbd3d04534de240c437f8b07bd28.tar.xz
mpd-c5d05ac0cf18dbd3d04534de240c437f8b07bd28.zip
DecoderCommand: convert to strictly-typed enum
Diffstat (limited to 'src/decoder/MpcdecDecoderPlugin.cxx')
-rw-r--r--src/decoder/MpcdecDecoderPlugin.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/decoder/MpcdecDecoderPlugin.cxx b/src/decoder/MpcdecDecoderPlugin.cxx
index d9c7a17d1..252fe92e6 100644
--- a/src/decoder/MpcdecDecoderPlugin.cxx
+++ b/src/decoder/MpcdecDecoderPlugin.cxx
@@ -147,7 +147,7 @@ mpcdec_decode(struct decoder *mpd_decoder, struct input_stream *is)
mpc_demux *demux = mpc_demux_init(&reader);
if (demux == nullptr) {
- if (decoder_get_command(mpd_decoder) != DECODE_COMMAND_STOP)
+ if (decoder_get_command(mpd_decoder) != DecoderCommand::STOP)
g_warning("Not a valid musepack stream");
return;
}
@@ -178,9 +178,9 @@ mpcdec_decode(struct decoder *mpd_decoder, struct input_stream *is)
is->IsSeekable(),
mpc_streaminfo_get_length(&info));
- enum decoder_command cmd = DECODE_COMMAND_NONE;
+ DecoderCommand cmd = DecoderCommand::NONE;
do {
- if (cmd == DECODE_COMMAND_SEEK) {
+ if (cmd == DecoderCommand::SEEK) {
mpc_int64_t where = decoder_seek_where(mpd_decoder) *
audio_format.sample_rate;
bool success;
@@ -218,7 +218,7 @@ mpcdec_decode(struct decoder *mpd_decoder, struct input_stream *is)
cmd = decoder_data(mpd_decoder, is,
chunk, ret * sizeof(chunk[0]),
bit_rate);
- } while (cmd != DECODE_COMMAND_STOP);
+ } while (cmd != DecoderCommand::STOP);
mpc_demux_exit(demux);
}