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/FaadDecoderPlugin.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/FaadDecoderPlugin.cxx')
-rw-r--r-- | src/decoder/FaadDecoderPlugin.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/decoder/FaadDecoderPlugin.cxx b/src/decoder/FaadDecoderPlugin.cxx index 1b7edb49f..547ba24e0 100644 --- a/src/decoder/FaadDecoderPlugin.cxx +++ b/src/decoder/FaadDecoderPlugin.cxx @@ -248,7 +248,7 @@ faad_song_duration(DecoderBuffer *buffer, struct input_stream *is) */ static bool faad_decoder_init(NeAACDecHandle decoder, DecoderBuffer *buffer, - struct audio_format *audio_format, GError **error_r) + AudioFormat &audio_format, GError **error_r) { int32_t nbytes; uint32_t sample_rate; @@ -285,7 +285,7 @@ faad_decoder_init(NeAACDecHandle decoder, DecoderBuffer *buffer, decoder_buffer_consume(buffer, nbytes); return audio_format_init_checked(audio_format, sample_rate, - SAMPLE_FORMAT_S16, channels, error_r); + SampleFormat::S16, channels, error_r); } /** @@ -325,7 +325,7 @@ faad_get_file_time_float(struct input_stream *is) if (length < 0) { bool ret; - struct audio_format audio_format; + AudioFormat audio_format; NeAACDecHandle decoder = NeAACDecOpen(); @@ -336,7 +336,7 @@ faad_get_file_time_float(struct input_stream *is) decoder_buffer_fill(buffer); - ret = faad_decoder_init(decoder, buffer, &audio_format, nullptr); + ret = faad_decoder_init(decoder, buffer, audio_format, nullptr); if (ret) length = 0; @@ -370,7 +370,7 @@ faad_stream_decode(struct decoder *mpd_decoder, struct input_stream *is) { GError *error = nullptr; float total_time = 0; - struct audio_format audio_format; + AudioFormat audio_format; bool ret; uint16_t bit_rate = 0; DecoderBuffer *buffer; @@ -400,7 +400,7 @@ faad_stream_decode(struct decoder *mpd_decoder, struct input_stream *is) /* initialize it */ - ret = faad_decoder_init(decoder, buffer, &audio_format, &error); + ret = faad_decoder_init(decoder, buffer, audio_format, &error); if (!ret) { g_warning("%s", error->message); g_error_free(error); @@ -410,7 +410,7 @@ faad_stream_decode(struct decoder *mpd_decoder, struct input_stream *is) /* initialize the MPD core */ - decoder_initialized(mpd_decoder, &audio_format, false, total_time); + decoder_initialized(mpd_decoder, audio_format, false, total_time); /* the decoder loop */ |