| 38 | constexpr float kPi = 3.14159265358979323846F; |
| 39 | |
| 40 | int64_t round_up_to_multiple(int64_t value, int64_t multiple) { |
| 41 | if (multiple <= 0) { |
| 42 | throw std::runtime_error("Stable Audio SAME alignment multiple must be positive"); |
| 43 | } |
| 44 | return ((value + multiple - 1) / multiple) * multiple; |
| 45 | } |
| 46 | |
| 47 | int64_t decoder_graph_latents(const StableAudioConfig & config, int64_t latent_tokens, bool chunked) { |
| 48 | if (chunked && latent_tokens > kSameChunkLatents) { |
no outgoing calls
no test coverage detected