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

Function append_first_branch_frame

src/models/heartmula/generator.cpp:340–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338}
339
340void 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
351bool 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) {

Callers 1

Calls 3

sizeMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected