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/PcmDecoderPlugin.cxx | |
parent | 67f591a9ce60651da41afc499bd9a22e25314e35 (diff) | |
download | mpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.tar.gz mpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.tar.xz mpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.zip |
audio_format: convert to C++
Diffstat (limited to '')
-rw-r--r-- | src/decoder/PcmDecoderPlugin.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/decoder/PcmDecoderPlugin.cxx b/src/decoder/PcmDecoderPlugin.cxx index f64357e68..8976f511f 100644 --- a/src/decoder/PcmDecoderPlugin.cxx +++ b/src/decoder/PcmDecoderPlugin.cxx @@ -36,9 +36,9 @@ extern "C" { static void pcm_stream_decode(struct decoder *decoder, struct input_stream *is) { - static constexpr struct audio_format audio_format = { + static constexpr AudioFormat audio_format = { 44100, - SAMPLE_FORMAT_S16, + SampleFormat::S16, 2, }; @@ -49,14 +49,14 @@ pcm_stream_decode(struct decoder *decoder, struct input_stream *is) GError *error = nullptr; enum decoder_command cmd; - double time_to_size = audio_format_time_to_size(&audio_format); + const double time_to_size = audio_format.GetTimeToSize(); float total_time = -1; const goffset size = input_stream_get_size(is); if (size >= 0) total_time = size / time_to_size; - decoder_initialized(decoder, &audio_format, + decoder_initialized(decoder, audio_format, input_stream_is_seekable(is), total_time); do { |