MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / samples_to_ms

Function samples_to_ms

src/models/omnivoice/audio_tokenizer.cpp:99–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99int64_t samples_to_ms(size_t samples, int sample_rate) {
100 return static_cast<int64_t>(
101 std::llround(1000.0 * static_cast<double>(samples) / static_cast<double>(sample_rate)));
102}
103
104size_t ms_to_samples(int64_t ms, int sample_rate, size_t total_samples) {
105 if (ms <= 0) {

Callers 6

detect_silence_ranges_msFunction · 0.85
trim_edges_pcm16Function · 0.85
remove_mid_silence_pcm16Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected