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

Function session_option_args

tests/core/audio_task_warm_bench.h:49–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49inline std::vector<std::pair<std::string, std::string>> session_option_args(int argc, char ** argv) {
50 std::vector<std::pair<std::string, std::string>> out;
51 for (int i = 1; i + 1 < argc; ++i) {
52 if (std::string(argv[i]) != "--session-option") {
53 continue;
54 }
55 const std::string option = argv[i + 1];
56 const size_t sep = option.find('=');
57 if (sep == std::string::npos || sep == 0) {
58 throw std::runtime_error("invalid audio warmbench --session-option: " + option);
59 }
60 out.emplace_back(option.substr(0, sep), option.substr(sep + 1));
61 }
62 return out;
63}
64
65inline engine::core::BackendType parse_backend(const std::string & value) {
66 if (value == "cpu") {

Callers 2

mainFunction · 0.85

Calls 2

stringFunction · 0.70
findMethod · 0.45

Tested by

no test coverage detected