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

Function expected_resample_output_count

src/framework/audio/resampling.cpp:143–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143size_t expected_resample_output_count(
144 size_t input_count,
145 int source_sample_rate_hz,
146 int target_sample_rate_hz) {
147 const double exact_output =
148 static_cast<double>(input_count) * static_cast<double>(target_sample_rate_hz) /
149 static_cast<double>(source_sample_rate_hz);
150 return static_cast<size_t>(std::ceil(exact_output));
151}
152
153void log_soxr_fallback(const SoxrResampleOptions & options, const std::string & reason) {
154 std::string message = options.warning_context;

Callers 1

try_resample_mono_soxrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected