| 67 | throw std::runtime_error("Audio chunker output size mismatch"); |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | void require_valid_time_span( |
| 72 | const runtime::TimeSpan & span, |
| 73 | int64_t audio_samples, |
| 74 | const char * label) { |
| 75 | if (span.start_sample < 0 || span.end_sample <= span.start_sample || span.end_sample > audio_samples) { |
| 76 | throw std::runtime_error(std::string(label) + " span is outside audio bounds"); |
| 77 | } |
| 78 | } |
| 79 |
no test coverage detected