| 86 | } |
| 87 | |
| 88 | FLAC__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 | |
| 101 | FLAC__bool streamEof(const FLAC__StreamDecoder*, void* clientData) |
| 102 | { |