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

Function SampleLengthToTime

viewer/src/utils/AudioUtils.cpp:28–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28int64_t SampleLengthToTime(int64_t length, int sampleRate, int channels) {
29 int64_t count = SampleLengthToCount(length, channels);
30 return static_cast<int64_t>(count * 1000000.0 / sampleRate);
31}
32
33int64_t SampleCountToLength(int64_t count, int channels) {
34 return count * channels * 2;

Callers 4

writeMethod · 0.85
getNextSampleMethod · 0.85
getNextSampleInternalMethod · 0.85
getNextSampleInternalMethod · 0.85

Calls 1

SampleLengthToCountFunction · 0.85

Tested by

no test coverage detected