From d1e7b4e38136f9342aad76c685a13adf0e69f869 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 3 Aug 2013 21:00:50 +0200 Subject: audio_format: convert to C++ --- src/decoder/sidplay_decoder_plugin.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/decoder/sidplay_decoder_plugin.cxx') diff --git a/src/decoder/sidplay_decoder_plugin.cxx b/src/decoder/sidplay_decoder_plugin.cxx index cfe82cf57..d63dca6af 100644 --- a/src/decoder/sidplay_decoder_plugin.cxx +++ b/src/decoder/sidplay_decoder_plugin.cxx @@ -285,11 +285,10 @@ sidplay_file_decode(struct decoder *decoder, const char *path_fs) /* initialize the MPD decoder */ - struct audio_format audio_format; - audio_format_init(&audio_format, 48000, SAMPLE_FORMAT_S16, channels); - assert(audio_format_valid(&audio_format)); + const AudioFormat audio_format(48000, SampleFormat::S16, channels); + assert(audio_format.IsValid()); - decoder_initialized(decoder, &audio_format, true, (float)song_len); + decoder_initialized(decoder, audio_format, true, (float)song_len); /* .. and play */ -- cgit v1.2.3