(data: &[u8])
| 1353 | /// Load a sound from raw file bytes (WAV or OGG). Fetched by JS glue via fetch(). |
| 1354 | #[wasm_bindgen] |
| 1355 | pub fn bloom_load_sound_bytes(data: &[u8]) -> f64 { |
| 1356 | if let Some(sound) = bloom_shared::audio::parse_wav(data) |
| 1357 | .or_else(|| bloom_shared::audio::parse_ogg(data)) |
| 1358 | { |
| 1359 | engine().audio.load_sound(sound) |
| 1360 | } else { |
| 1361 | 0.0 |
| 1362 | } |
| 1363 | } |
| 1364 | |
| 1365 | #[wasm_bindgen] |
| 1366 | pub fn bloom_play_sound(handle: f64) { |
nothing calls this directly
no test coverage detected