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/AdPlugDecoderPlugin.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/AdPlugDecoderPlugin.cxx')
-rw-r--r-- | src/decoder/AdPlugDecoderPlugin.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/decoder/AdPlugDecoderPlugin.cxx b/src/decoder/AdPlugDecoderPlugin.cxx index a9a90c283..37a95ce5d 100644 --- a/src/decoder/AdPlugDecoderPlugin.cxx +++ b/src/decoder/AdPlugDecoderPlugin.cxx @@ -60,11 +60,10 @@ adplug_file_decode(struct decoder *decoder, const char *path_fs) if (player == nullptr) return; - struct audio_format audio_format; - audio_format_init(&audio_format, sample_rate, SAMPLE_FORMAT_S16, 2); - assert(audio_format_valid(&audio_format)); + const AudioFormat audio_format(sample_rate, SampleFormat::S16, 2); + assert(audio_format.IsValid()); - decoder_initialized(decoder, &audio_format, false, + decoder_initialized(decoder, audio_format, false, player->songlength() / 1000.); int16_t buffer[2048]; |