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

Function bloom_load_sound_bytes

native/web/src/lib.rs:1355–1363  ·  view source on GitHub ↗
(data: &[u8])

Source from the content-addressed store, hash-verified

1353/// Load a sound from raw file bytes (WAV or OGG). Fetched by JS glue via fetch().
1354#[wasm_bindgen]
1355pub 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]
1366pub fn bloom_play_sound(handle: f64) {

Callers

nothing calls this directly

Calls 4

parse_wavFunction · 0.85
parse_oggFunction · 0.85
load_soundMethod · 0.80
engineFunction · 0.70

Tested by

no test coverage detected