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

Function SampleCountToLength

viewer/src/utils/AudioUtils.cpp:33–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33int64_t SampleCountToLength(int64_t count, int channels) {
34 return count * channels * 2;
35}
36
37int64_t SampleTimeToLength(int64_t time, int sampleRate, int channels) {
38 int count = ceill(static_cast<double>(time * sampleRate) / 1000000.0);

Callers 5

SampleTimeToLengthFunction · 0.85
getNextSampleMethod · 0.85
AudioReaderMethod · 0.85
AudioTrackReaderMethod · 0.85
readAudioBytesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected