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

Method RunScan

src/decoder/plugins/MadDecoderPlugin.cxx:966–983  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

964}
965
966inline bool
967MadDecoder::RunScan(TagHandler &handler) noexcept
968{
969 if (!DecodeFirstFrame(nullptr))
970 return false;
971
972 if (!total_time.IsNegative())
973 handler.OnDuration(SongTime(total_time));
974
975 try {
976 handler.OnAudioFormat(CheckAudioFormat(frame.header.samplerate,
977 SampleFormat::S24_P32,
978 MAD_NCHANNELS(&frame.header)));
979 } catch (...) {
980 }
981
982 return true;
983}
984
985static bool
986mad_decoder_scan_stream(InputStream &is, TagHandler &handler)

Callers 1

mad_decoder_scan_streamFunction · 0.80

Calls 3

CheckAudioFormatFunction · 0.70
OnDurationMethod · 0.45
OnAudioFormatMethod · 0.45

Tested by

no test coverage detected