MCPcopy Create free account
hub / github.com/Tencent/libpag / seek

Method seek

viewer/src/audio/reader/AudioSourceReader.cpp:46–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void AudioSourceReader::seek(int64_t time) {
47 startTime = time;
48 startOffset = Utils::SampleTimeToLength(time, outputConfig->sampleRate, outputConfig->channels);
49 advance = true;
50 decoder->onFlush();
51 demuxer->seekTo(std::max(static_cast<int64_t>(0), time - SeekForwardTimeUs));
52}
53
54SampleData AudioSourceReader::getNextFrame() {
55 SampleData data = {};

Callers

nothing calls this directly

Calls 3

SampleTimeToLengthFunction · 0.85
onFlushMethod · 0.65
seekToMethod · 0.45

Tested by

no test coverage detected