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

Function round_up_to_multiple

src/models/stable_audio/sampler.cpp:20–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18constexpr float kPi = 3.14159265358979323846F;
19
20int64_t round_up_to_multiple(int64_t value, int64_t multiple) {
21 if (multiple <= 0) {
22 throw std::runtime_error("Stable Audio alignment multiple must be positive");
23 }
24 return ((value + multiple - 1) / multiple) * multiple;
25}
26
27int64_t ceil_div_i64(int64_t value, int64_t divisor) {
28 if (divisor <= 0) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected