INNER CODE UNIT · TypeScript

setSoundVolume

Bloom-Engine/engine · src/audio/index.ts:46

export function setSoundVolume(sound: Sound, volume: number): void {
  bloom_set_sound_volume(sound.handle, volume);
}

export function setMasterVolume(volume: number): void {
  bloom_set_master_volume(volume);
}

// Music functions

export function loadMusic(path: string): Music {
  const handle = bloom_load_music(path as any);
  return { handle };
}

/// Returns the raw numeric handle. Prefer this on Android (aarch64): Perry 0.5.x
/// miscompiles `music.handle` field reads that feed straight into an f64 FFI slot,
/// producing NaN and dropping the music.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…