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

Function bloom_load_music_bytes

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

Source from the content-addressed store, hash-verified

1398/// Load music from raw file bytes (WAV or OGG). Fetched by JS glue via fetch().
1399#[wasm_bindgen]
1400pub fn bloom_load_music_bytes(data: &[u8]) -> f64 {
1401 if let Some(sound) = bloom_shared::audio::parse_wav(data)
1402 .or_else(|| bloom_shared::audio::parse_ogg(data))
1403 {
1404 engine().audio.load_music(sound)
1405 } else {
1406 0.0
1407 }
1408}
1409
1410/// Mix audio into an interleaved stereo f32 buffer.
1411/// Called by JS Web Audio ScriptProcessorNode/AudioWorklet each audio frame.

Callers

nothing calls this directly

Calls 4

parse_wavFunction · 0.85
parse_oggFunction · 0.85
load_musicMethod · 0.80
engineFunction · 0.70

Tested by

no test coverage detected