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

Function append_audio_buffer

src/framework/runtime/session.cpp:233–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233void append_audio_buffer(AudioBuffer & dst, const AudioBuffer & src) {
234 if (src.sample_rate <= 0 || src.channels <= 0) {
235 throw std::runtime_error("audio append requires valid source format");
236 }
237 if (dst.sample_rate == 0) {
238 dst.sample_rate = src.sample_rate;
239 dst.channels = src.channels;
240 } else if (dst.sample_rate != src.sample_rate || dst.channels != src.channels) {
241 throw std::runtime_error("audio append requires matching audio format");
242 }
243 dst.samples.insert(dst.samples.end(), src.samples.begin(), src.samples.end());
244}
245
246GraphCapacityMode parse_graph_capacity_mode(const std::string & value) {
247 if (value == "fixed") {

Callers 5

runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
run_voice_cloningMethod · 0.85
runMethod · 0.85

Calls 2

endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected