diff options
author | Max Kellermann <max@duempel.org> | 2013-08-03 21:00:50 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-08-03 21:37:56 +0200 |
commit | d1e7b4e38136f9342aad76c685a13adf0e69f869 (patch) | |
tree | 49643b937ddfe735511b566a71398da5a945d7aa /src/decoder/ModplugDecoderPlugin.cxx | |
parent | 67f591a9ce60651da41afc499bd9a22e25314e35 (diff) | |
download | mpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.tar.gz mpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.tar.xz mpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.zip |
audio_format: convert to C++
Diffstat (limited to 'src/decoder/ModplugDecoderPlugin.cxx')
-rw-r--r-- | src/decoder/ModplugDecoderPlugin.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/decoder/ModplugDecoderPlugin.cxx b/src/decoder/ModplugDecoderPlugin.cxx index 2ba3b0f49..b95736bf8 100644 --- a/src/decoder/ModplugDecoderPlugin.cxx +++ b/src/decoder/ModplugDecoderPlugin.cxx @@ -94,7 +94,6 @@ mod_decode(struct decoder *decoder, struct input_stream *is) ModPlugFile *f; ModPlug_Settings settings; GByteArray *bdatas; - struct audio_format audio_format; int ret; char audio_buffer[MODPLUG_FRAME_SIZE]; enum decoder_command cmd = DECODE_COMMAND_NONE; @@ -122,10 +121,10 @@ mod_decode(struct decoder *decoder, struct input_stream *is) return; } - audio_format_init(&audio_format, 44100, SAMPLE_FORMAT_S16, 2); - assert(audio_format_valid(&audio_format)); + static constexpr AudioFormat audio_format(44100, SampleFormat::S16, 2); + assert(audio_format.IsValid()); - decoder_initialized(decoder, &audio_format, + decoder_initialized(decoder, audio_format, input_stream_is_seekable(is), ModPlug_GetLength(f) / 1000.0); |