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

Function readCallback

src/SFML/Audio/SoundFileReaderMp3.cpp:49–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47namespace
48{
49std::size_t readCallback(void* userData, void* bufferOut, std::size_t bytesToRead)
50{
51 auto* stream = static_cast<sf::InputStream*>(userData);
52 return stream->read(bufferOut, bytesToRead).value_or(0);
53}
54
55drmp3_bool32 seekCallback(void* userData, int offset, drmp3_seek_origin origin)
56{

Callers

nothing calls this directly

Calls 1

readMethod · 0.45

Tested by

no test coverage detected