MCPcopy Create free account
hub / github.com/SFML/SFML / check

Method check

src/SFML/Audio/SoundFileReaderMp3.cpp:105–119  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

103{
104////////////////////////////////////////////////////////////
105bool SoundFileReaderMp3::check(InputStream& stream)
106{
107 std::array<std::uint8_t, 10> header{};
108
109 if (stream.read(header.data(), header.size()) != header.size())
110 return false;
111
112 if (hasValidId3Tag(header.data()))
113 return true;
114
115 if (drmp3_hdr_valid(header.data()))
116 return true;
117
118 return false;
119}
120
121
122////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 3

hasValidId3TagFunction · 0.85
drmp3_hdr_validFunction · 0.85
readMethod · 0.45

Tested by

no test coverage detected