aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/MikmodDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-03 21:00:50 +0200
committerMax Kellermann <max@duempel.org>2013-08-03 21:37:56 +0200
commitd1e7b4e38136f9342aad76c685a13adf0e69f869 (patch)
tree49643b937ddfe735511b566a71398da5a945d7aa /src/decoder/MikmodDecoderPlugin.cxx
parent67f591a9ce60651da41afc499bd9a22e25314e35 (diff)
downloadmpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.tar.gz
mpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.tar.xz
mpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.zip
audio_format: convert to C++
Diffstat (limited to 'src/decoder/MikmodDecoderPlugin.cxx')
-rw-r--r--src/decoder/MikmodDecoderPlugin.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/decoder/MikmodDecoderPlugin.cxx b/src/decoder/MikmodDecoderPlugin.cxx
index d332664ee..3aa8a68ed 100644
--- a/src/decoder/MikmodDecoderPlugin.cxx
+++ b/src/decoder/MikmodDecoderPlugin.cxx
@@ -147,7 +147,6 @@ mikmod_decoder_file_decode(struct decoder *decoder, const char *path_fs)
{
char *path2;
MODULE *handle;
- struct audio_format audio_format;
int ret;
SBYTE buffer[MIKMOD_FRAME_SIZE];
enum decoder_command cmd = DECODE_COMMAND_NONE;
@@ -164,10 +163,10 @@ mikmod_decoder_file_decode(struct decoder *decoder, const char *path_fs)
/* Prevent module from looping forever */
handle->loop = 0;
- audio_format_init(&audio_format, mikmod_sample_rate, SAMPLE_FORMAT_S16, 2);
- assert(audio_format_valid(&audio_format));
+ const AudioFormat audio_format(mikmod_sample_rate, SampleFormat::S16, 2);
+ assert(audio_format.IsValid());
- decoder_initialized(decoder, &audio_format, false, 0);
+ decoder_initialized(decoder, audio_format, false, 0);
Player_Start(handle);
while (cmd == DECODE_COMMAND_NONE && Player_Active()) {