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

Method read

src/SFML/Audio/SoundFileReaderMp3.cpp:178–185  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

176
177////////////////////////////////////////////////////////////
178std::uint64_t SoundFileReaderMp3::read(std::int16_t* samples, std::uint64_t maxCount)
179{
180 // dr_mp3's PCM frame contains one sample per channel
181 std::uint64_t toRead = std::min(maxCount, m_numSamples - m_position) / m_decoder.channels;
182 toRead = std::uint64_t{drmp3_read_pcm_frames_s16(&m_decoder, toRead, samples)} * m_decoder.channels;
183 m_position += toRead;
184 return toRead;
185}
186
187} // namespace sf::priv

Callers 2

readCallbackFunction · 0.45
checkMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected