MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / load_with

Function load_with

native/watchos/src/audio.rs:27–34  ·  view source on GitHub ↗
(path: &str, load_fn: F)

Source from the content-addressed store, hash-verified

25}
26
27fn load_with<F>(path: &str, load_fn: F) -> u32
28where F: FnOnce(*const c_char) -> u32
29{
30 if path.is_empty() { return 0; }
31 let full = if path.starts_with('/') { path.to_string() } else { textures::resolve_bundle_path(path) };
32 let Ok(c) = CString::new(full) else { return 0 };
33 unsafe { load_fn(c.as_ptr()) }
34}
35
36pub fn init_audio() { unsafe { bloom_watchos_audio_init(); } }
37pub fn close_audio() { unsafe { bloom_watchos_audio_close(); } }

Callers 2

load_soundFunction · 0.85
load_musicFunction · 0.85

Calls 2

resolve_bundle_pathFunction · 0.85
as_ptrMethod · 0.80

Tested by

no test coverage detected