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

Function parse_session_options

tests/stable_audio/stable_audio_warm_bench.cpp:36–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36std::vector<std::pair<std::string, std::string>> parse_session_options(int argc, char ** argv) {
37 std::vector<std::pair<std::string, std::string>> out;
38 for (int i = 1; i + 1 < argc; ++i) {
39 if (std::string(argv[i]) != "--session-option") {
40 continue;
41 }
42 const std::string option = argv[i + 1];
43 const size_t eq = option.find('=');
44 if (eq == std::string::npos || eq == 0) {
45 throw std::runtime_error("invalid Stable Audio --session-option: " + option);
46 }
47 out.emplace_back(option.substr(0, eq), option.substr(eq + 1));
48 }
49 return out;
50}
51
52engine::core::BackendType parse_backend(const std::string & value) {
53 if (value == "cuda") {

Callers 1

mainFunction · 0.70

Calls 2

stringFunction · 0.70
findMethod · 0.45

Tested by

no test coverage detected