| 495 | std::vector<float> waveform; |
| 496 | waveform.reserve(static_cast<size_t>(frames * hop_size)); |
| 497 | std::vector<float> chunk_mel(static_cast<size_t>(channels * graph_frames), 0.0F); |
| 498 | for (int64_t position = 0; position < frames; position += active_frames) { |
| 499 | const int64_t active = std::min(active_frames, frames - position); |
| 500 | const int64_t source_start = std::max<int64_t>(0, position - overlap_frames); |
| 501 | const int64_t source_end = std::min<int64_t>(frames, position + active + overlap_frames); |
| 502 | const int64_t left_context = position - source_start; |
| 503 | const int64_t target_start = overlap_frames - left_context; |
| 504 | const int64_t copy_frames = source_end - source_start; |
| 505 | if (target_start < 0 || target_start + copy_frames > graph_frames) { |
| 506 | throw std::runtime_error("Seed-VC BigVGAN fixed chunk copy range is invalid"); |
no test coverage detected