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/OpusDecoderPlugin.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/OpusDecoderPlugin.cxx')
-rw-r--r-- | src/decoder/OpusDecoderPlugin.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/decoder/OpusDecoderPlugin.cxx b/src/decoder/OpusDecoderPlugin.cxx index 08c67b570..94c687317 100644 --- a/src/decoder/OpusDecoderPlugin.cxx +++ b/src/decoder/OpusDecoderPlugin.cxx @@ -202,11 +202,10 @@ MPDOpusDecoder::HandleBOS(const ogg_packet &packet) return DECODE_COMMAND_STOP; } - struct audio_format audio_format; - audio_format_init(&audio_format, opus_sample_rate, - SAMPLE_FORMAT_S16, channels); - decoder_initialized(decoder, &audio_format, false, -1); - frame_size = audio_format_frame_size(&audio_format); + const AudioFormat audio_format(opus_sample_rate, + SampleFormat::S16, channels); + decoder_initialized(decoder, audio_format, false, -1); + frame_size = audio_format.GetFrameSize(); /* allocate an output buffer for 16 bit PCM samples big enough to hold a quarter second, larger than 120ms required by |