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

Function streamLength

src/SFML/Audio/SoundFileReaderFlac.cpp:88–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88FLAC__StreamDecoderLengthStatus streamLength(const FLAC__StreamDecoder*, FLAC__uint64* streamLength, void* clientData)
89{
90 auto* data = static_cast<sf::priv::SoundFileReaderFlac::ClientData*>(clientData);
91
92 if (const std::optional count = data->stream->getSize())
93 {
94 *streamLength = *count;
95 return FLAC__STREAM_DECODER_LENGTH_STATUS_OK;
96 }
97
98 return FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR;
99}
100
101FLAC__bool streamEof(const FLAC__StreamDecoder*, void* clientData)
102{

Callers

nothing calls this directly

Calls 1

getSizeMethod · 0.45

Tested by

no test coverage detected