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

Function parse_size_mb_option

src/framework/runtime/options.cpp:192–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190
191std::optional<float> parse_float_option(
192 const std::unordered_map<std::string, std::string> & options,
193 std::initializer_list<std::string_view> keys) {
194 if (const auto match = find_option_match(options, keys)) {
195 return parse_float_value(match->value, match->key);
196 }
197 return std::nullopt;
198}
199
200std::optional<float> parse_finite_float_option(
201 const std::unordered_map<std::string, std::string> & options,
202 std::initializer_list<std::string_view> keys) {
203 if (const auto match = find_option_match(options, keys)) {
204 const float value = parse_float_value(match->value, match->key);
205 if (!std::isfinite(value)) {
206 throw std::runtime_error(match->key + " must be a finite float");
207 }

Callers 10

OmniVoiceSessionMethod · 0.85
VoxCPM2SessionMethod · 0.85
Qwen3TTSSessionMethod · 0.85
MioCodecSessionMethod · 0.85
HeartMuLaSessionMethod · 0.85
SortformerDiarSessionMethod · 0.85
Qwen3ASRSessionMethod · 0.85
MioTTSSessionMethod · 0.85
Vevo2SessionMethod · 0.85

Calls 3

find_option_matchFunction · 0.85
parse_i64_valueFunction · 0.85
checked_mib_to_bytesFunction · 0.85

Tested by

no test coverage detected