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

Function modplug_scan_stream

src/decoder/plugins/ModplugDecoderPlugin.cxx:117–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117static bool
118modplug_scan_stream(InputStream &is, TagHandler &handler) noexcept
119{
120 ModPlugFile *f = LoadModPlugFile(nullptr, is);
121 if (f == nullptr)
122 return false;
123
124 handler.OnDuration(SongTime::FromMS(ModPlug_GetLength(f)));
125
126 const char *title = ModPlug_GetName(f);
127 if (title != nullptr)
128 handler.OnTag(TAG_TITLE, title);
129
130 ModPlug_Unload(f);
131
132 return true;
133}
134
135static const char *const mod_suffixes[] = {
136 "669", "amf", "ams", "dbm", "dfm", "dsm", "far", "it",

Callers

nothing calls this directly

Calls 3

LoadModPlugFileFunction · 0.85
OnDurationMethod · 0.45
OnTagMethod · 0.45

Tested by

no test coverage detected