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

Function SampleTimeToLength

viewer/src/utils/AudioUtils.cpp:37–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37int64_t SampleTimeToLength(int64_t time, int sampleRate, int channels) {
38 int count = ceill(static_cast<double>(time * sampleRate) / 1000000.0);
39 return SampleCountToLength(count, channels);
40}
41
42int64_t MergeSamples(const std::vector<std::shared_ptr<ByteData>>& audioSamples, uint8_t* buffer) {
43 if (audioSamples.empty()) {

Callers 7

AudioSegmentReaderMethod · 0.85
seekMethod · 0.85
seekMethod · 0.85
seekMethod · 0.85
getNextFrameMethod · 0.85
seekMethod · 0.85
getNextSampleInternalMethod · 0.85

Calls 1

SampleCountToLengthFunction · 0.85

Tested by

no test coverage detected