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}
191
192size_t parse_size_mb_option(
193 const std::unordered_map<std::string, std::string> & options,
194 std::initializer_list<std::string_view> keys,
195 size_t fallback_bytes) {
196 if (const auto match = find_option_match(options, keys)) {
197 const int64_t mb = parse_i64_value(match->value, match->key);
198 if (mb <= 0) {
199 throw std::runtime_error(match->key + " must be positive");
200 }
201 return checked_mib_to_bytes(mb, match->key);
202 }
203 return fallback_bytes;
204}
205
206uint64_t random_u64_seed() {
207 std::random_device random_device;

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