MCPcopy Create free account
hub / github.com/MusicPlayerDaemon/MPD / GetDeltaPosition

Method GetDeltaPosition

src/decoder/plugins/FlacCommon.cxx:105–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105FLAC__uint64
106FlacDecoder::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
123FLAC__StreamDecoderWriteStatus
124FlacDecoder::OnWrite(const FLAC__Frame &frame,

Callers 1

flac_write_cbFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected