(data: &[u8])
| 1398 | /// Load music from raw file bytes (WAV or OGG). Fetched by JS glue via fetch(). |
| 1399 | #[wasm_bindgen] |
| 1400 | pub 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. |
nothing calls this directly
no test coverage detected