| 141 | } |
| 142 | |
| 143 | size_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 | |
| 153 | void log_soxr_fallback(const SoxrResampleOptions & options, const std::string & reason) { |
| 154 | std::string message = options.warning_context; |
no outgoing calls
no test coverage detected