| 338 | } |
| 339 | |
| 340 | void append_first_branch_frame( |
| 341 | HeartMuLaGeneratedFrames & out, |
| 342 | const std::vector<int32_t> & frame, |
| 343 | const HeartMuLaConfig & config) { |
| 344 | if (static_cast<int64_t>(frame.size()) < config.audio_num_codebooks) { |
| 345 | throw std::runtime_error("HeartMuLa generated frame is too small"); |
| 346 | } |
| 347 | out.codes.insert(out.codes.end(), frame.begin(), frame.begin() + static_cast<std::ptrdiff_t>(config.audio_num_codebooks)); |
| 348 | ++out.frames; |
| 349 | } |
| 350 | |
| 351 | bool first_branch_has_eos(const std::vector<int32_t> & frame, const HeartMuLaAssets & assets) { |
| 352 | for (int64_t q = 0; q < assets.mula_config.audio_num_codebooks; ++q) { |
no test coverage detected