| 103 | } |
| 104 | |
| 105 | FLAC__uint64 |
| 106 | FlacDecoder::GetDeltaPosition(const FLAC__StreamDecoder &sd) |
| 107 | { |
| 108 | FLAC__uint64 nbytes; |
| 109 | if (!FLAC__stream_decoder_get_decode_position(&sd, &nbytes)) |
| 110 | return 0; |
| 111 | |
| 112 | if (position > 0 && nbytes > position) { |
| 113 | nbytes -= position; |
| 114 | position += nbytes; |
| 115 | } else { |
| 116 | position = nbytes; |
| 117 | nbytes = 0; |
| 118 | } |
| 119 | |
| 120 | return nbytes; |
| 121 | } |
| 122 | |
| 123 | FLAC__StreamDecoderWriteStatus |
| 124 | FlacDecoder::OnWrite(const FLAC__Frame &frame, |