Commit 653edc9
committed
fix(audio): support ADPCM WAV, validate format on selection, remove unsupported FLAC filter
Three related fixes for issue #389, where custom notification sounds
silently fell back to the built-in default on Windows.
Root cause: Rodio 0.22 uses Symphonia for decoding. The compiled
Symphonia crates only included PCM WAV support. ADPCM-encoded WAV
(the default output of Windows Sound Recorder) failed to decode
silently, and FLAC — offered in the file picker — was never decodable.
Failures were never surfaced to the user; they would see their filename
in settings but hear the wrong sound.
- Add symphonia-codec-adpcm as a direct dependency so ADPCM WAV files
decode correctly via the existing Decoder::new() path.
- Add audio::probe_audio_file() which attempts to construct a Decoder
from a copied file before committing it. On failure, the orphan is
deleted and the in-memory custom path is cleared so playback falls
back to the embedded default cleanly.
- Call probe_audio_file() in audio_set_custom after the file is copied;
return an Err to the frontend if the format is unsupported.
- Add per-cue inline error state to NotificationsSection.svelte so the
error message is displayed below the failing row. Error clears on a
successful selection or when the user restores the default.
- Remove 'flac' from the openAudioFilePicker filter; FLAC decoding is
not available and the option was misleading.1 parent 98d9ee5 commit 653edc9
6 files changed
Lines changed: 65 additions & 1 deletion
File tree
- src-tauri
- src
- audio
- src/lib
- components/settings/sections
- ipc
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
212 | 224 | | |
213 | 225 | | |
214 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
454 | 463 | | |
455 | 464 | | |
456 | 465 | | |
| |||
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
46 | 62 | | |
47 | 63 | | |
48 | 64 | | |
| |||
76 | 92 | | |
77 | 93 | | |
78 | 94 | | |
| 95 | + | |
79 | 96 | | |
80 | 97 | | |
81 | 98 | | |
| |||
87 | 104 | | |
88 | 105 | | |
89 | 106 | | |
| 107 | + | |
90 | 108 | | |
91 | 109 | | |
| 110 | + | |
92 | 111 | | |
93 | 112 | | |
94 | 113 | | |
95 | 114 | | |
96 | 115 | | |
97 | 116 | | |
98 | 117 | | |
| 118 | + | |
99 | 119 | | |
100 | 120 | | |
101 | 121 | | |
| |||
122 | 142 | | |
123 | 143 | | |
124 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
125 | 148 | | |
126 | 149 | | |
127 | 150 | | |
| |||
324 | 347 | | |
325 | 348 | | |
326 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
327 | 358 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
0 commit comments