aboutsummaryrefslogtreecommitdiff
path: root/lib/audio/state.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/audio/state.ts')
-rw-r--r--lib/audio/state.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/audio/state.ts b/lib/audio/state.ts
new file mode 100644
index 0000000..7ad273c
--- /dev/null
+++ b/lib/audio/state.ts
@@ -0,0 +1,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)