| 73 | } |
| 74 | |
| 75 | FLAC__StreamDecoderTellStatus streamTell(const FLAC__StreamDecoder*, FLAC__uint64* absoluteByteOffset, void* clientData) |
| 76 | { |
| 77 | auto* data = static_cast<sf::priv::SoundFileReaderFlac::ClientData*>(clientData); |
| 78 | |
| 79 | if (const std::optional position = data->stream->tell()) |
| 80 | { |
| 81 | *absoluteByteOffset = *position; |
| 82 | return FLAC__STREAM_DECODER_TELL_STATUS_OK; |
| 83 | } |
| 84 | |
| 85 | return FLAC__STREAM_DECODER_TELL_STATUS_ERROR; |
| 86 | } |
| 87 | |
| 88 | FLAC__StreamDecoderLengthStatus streamLength(const FLAC__StreamDecoder*, FLAC__uint64* streamLength, void* clientData) |
| 89 | { |