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

Function truncate_samples_to_count

src/framework/audio/waveform_ops.cpp:53–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53void truncate_samples_to_count(std::vector<float> & samples, size_t max_sample_count) {
54 if (samples.size() > max_sample_count) {
55 samples.resize(max_sample_count);
56 }
57}
58
59void normalize_peak_to_unit_range_and_clamp_in_place(std::vector<float> & samples) {
60 float peak = 0.0F;

Callers 4

seed_vc_prepare_audioFunction · 0.85
trim_audioFunction · 0.85
trim_audio_secondsFunction · 0.85

Calls 2

sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected