From c5d05ac0cf18dbd3d04534de240c437f8b07bd28 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 27 Sep 2013 12:11:37 +0200 Subject: DecoderCommand: convert to strictly-typed enum --- src/decoder/MpcdecDecoderPlugin.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/decoder/MpcdecDecoderPlugin.cxx') 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); } -- cgit v1.2.3