MCPcopy Create free account
hub / github.com/MusicPlayerDaemon/MPD / RunDecoder

Method RunDecoder

src/decoder/plugins/MadDecoderPlugin.cxx:932–957  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

930}
931
932inline void
933MadDecoder::RunDecoder() noexcept
934{
935 assert(client != nullptr);
936
937 Tag tag;
938 if (!DecodeFirstFrame(&tag)) {
939 if (client->GetCommand() == DecoderCommand::NONE)
940 LogError(mad_domain,
941 "input does not appear to be a mp3 bit stream");
942 return;
943 }
944
945 AllocateBuffers();
946
947 client->Ready(CheckAudioFormat(frame.header.samplerate,
948 SampleFormat::S24_P32,
949 MAD_NCHANNELS(&frame.header)),
950 input_stream.IsSeekable(),
951 total_time);
952
953 if (!tag.IsEmpty())
954 client->SubmitTag(input_stream, std::move(tag));
955
956 while (Read()) {}
957}
958
959static void
960mad_decode(DecoderClient &client, InputStream &input_stream)

Callers 1

mad_decodeFunction · 0.80

Calls 5

IsEmptyMethod · 0.80
CheckAudioFormatFunction · 0.70
GetCommandMethod · 0.45
ReadyMethod · 0.45
SubmitTagMethod · 0.45

Tested by

no test coverage detected