aboutsummaryrefslogtreecommitdiff
path: root/lib/audio/state.ts
blob: 7ad273cf83f4c24e2e459ef190c40816ed860ac6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { writable, type Writable } from 'svelte/store'

/**
 * Master mute. When true, every audio source is silenced regardless of
 * category volume. Surfaced on the Settings screen as a single toggle.
 */
export const masterMuted: Writable<boolean> = writable(false)

/**
 * Volume for ambient layers — title music, location textures, region
 * beds. 0..1. Ceremonial pieces (death, memoir) use a separate store
 * when that category comes online.
 */
export const ambientVolume: Writable<number> = writable(0.6)