aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/FluidsynthDecoderPlugin.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/FluidsynthDecoderPlugin.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/FluidsynthDecoderPlugin.cxx')
-rw-r--r--src/decoder/FluidsynthDecoderPlugin.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decoder/FluidsynthDecoderPlugin.cxx b/src/decoder/FluidsynthDecoderPlugin.cxx
index 533f02ef1..4db4f1618 100644
--- a/src/decoder/FluidsynthDecoderPlugin.cxx
+++ b/src/decoder/FluidsynthDecoderPlugin.cxx
@@ -102,7 +102,6 @@ fluidsynth_file_decode(struct decoder *decoder, const char *path_fs)
fluid_synth_t *synth;
fluid_player_t *player;
int ret;
- enum decoder_command cmd;
/* set up fluid settings */
@@ -167,6 +166,7 @@ fluidsynth_file_decode(struct decoder *decoder, const char *path_fs)
const AudioFormat audio_format(sample_rate, SampleFormat::S16, 2);
decoder_initialized(decoder, audio_format, false, -1);
+ DecoderCommand cmd;
while (fluid_player_get_status(player) == FLUID_PLAYER_PLAYING) {
int16_t buffer[2048];
const unsigned max_frames = G_N_ELEMENTS(buffer) / 2;
@@ -182,7 +182,7 @@ fluidsynth_file_decode(struct decoder *decoder, const char *path_fs)
cmd = decoder_data(decoder, nullptr, buffer, sizeof(buffer),
0);
- if (cmd != DECODE_COMMAND_NONE)
+ if (cmd != DecoderCommand::NONE)
break;
}