| 63 | } |
| 64 | |
| 65 | FLAC__StreamDecoderSeekStatus streamSeek(const FLAC__StreamDecoder*, FLAC__uint64 absoluteByteOffset, void* clientData) |
| 66 | { |
| 67 | auto* data = static_cast<sf::priv::SoundFileReaderFlac::ClientData*>(clientData); |
| 68 | |
| 69 | if (data->stream->seek(static_cast<std::size_t>(absoluteByteOffset)).has_value()) |
| 70 | return FLAC__STREAM_DECODER_SEEK_STATUS_OK; |
| 71 | |
| 72 | return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR; |
| 73 | } |
| 74 | |
| 75 | FLAC__StreamDecoderTellStatus streamTell(const FLAC__StreamDecoder*, FLAC__uint64* absoluteByteOffset, void* clientData) |
| 76 | { |