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/DsdiffDecoderPlugin.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/DsdiffDecoderPlugin.cxx')
-rw-r--r-- | src/decoder/DsdiffDecoderPlugin.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/decoder/DsdiffDecoderPlugin.cxx b/src/decoder/DsdiffDecoderPlugin.cxx index 4b9a59a7a..10b31a204 100644 --- a/src/decoder/DsdiffDecoderPlugin.cxx +++ b/src/decoder/DsdiffDecoderPlugin.cxx @@ -433,9 +433,9 @@ dsdiff_stream_decode(struct decoder *decoder, struct input_stream *is) return; GError *error = nullptr; - struct audio_format audio_format; - if (!audio_format_init_checked(&audio_format, metadata.sample_rate / 8, - SAMPLE_FORMAT_DSD, + AudioFormat audio_format; + if (!audio_format_init_checked(audio_format, metadata.sample_rate / 8, + SampleFormat::DSD, metadata.channels, &error)) { g_warning("%s", error->message); g_error_free(error); @@ -448,7 +448,7 @@ dsdiff_stream_decode(struct decoder *decoder, struct input_stream *is) (float) metadata.sample_rate; /* success: file was recognized */ - decoder_initialized(decoder, &audio_format, false, songtime); + decoder_initialized(decoder, audio_format, false, songtime); /* every iteration of the following loop decodes one "DSD" chunk from a DFF file */ @@ -487,9 +487,9 @@ dsdiff_scan_stream(struct input_stream *is, if (!dsdiff_read_metadata(nullptr, is, &metadata, &chunk_header)) return false; - struct audio_format audio_format; - if (!audio_format_init_checked(&audio_format, metadata.sample_rate / 8, - SAMPLE_FORMAT_DSD, + AudioFormat audio_format; + if (!audio_format_init_checked(audio_format, metadata.sample_rate / 8, + SampleFormat::DSD, metadata.channels, nullptr)) /* refuse to parse files which we cannot play anyway */ return false; |