(path: &str, load_fn: F)
| 25 | } |
| 26 | |
| 27 | fn load_with<F>(path: &str, load_fn: F) -> u32 |
| 28 | where 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 | |
| 36 | pub fn init_audio() { unsafe { bloom_watchos_audio_init(); } } |
| 37 | pub fn close_audio() { unsafe { bloom_watchos_audio_close(); } } |
no test coverage detected