Commit Graph

5 Commits

Author SHA1 Message Date
Jay
7059a85742 Re-implement custom audio files support. (#379)
* reimplement custom audio loading for `toast` and `key_click` using `from_mp3`

* run cargo fmt

* `try_bytes_from_config`: output with `log::trace` when file cannot be opened

* rewrite `try_bytes_from_config`

* use file `read_to_end`, log categories

* edit `register_wgui_samples`

* rework audio functions for loading custom wgui sounds
oh hey, it works!

* clean up

* allow custom `startup` and `app_start` sounds
these sounds are loaded on-demand and never registered; this behaviour is unchanged

* edit `bytes_from_config` outputs

* use return value of `read_to_end` instead of `len()` for reported file size

* implement suggested changes
- remove now-unused `register_mp3_sample_from_assets` function
- replace implementation of `try_bytes_from_config`
  - missing the `real_path` context

* swap out `context`s for `inspect_err`s with closures to output `real_path`

* clean up `audio.rs`
- remove unused import
- unify capitalisation + quotes in output messages.
2026-01-12 12:42:03 +00:00
Aleksander
51dbb6f14d checkbox sounds, app launch sounds 2026-01-06 17:09:39 +01:00
Aleksander
553dd02fc4 do not keep startup sound in memory 2026-01-04 12:51:12 +01:00
Aleksander
feba52c28f dash and wgui sounds 2026-01-03 15:00:47 +01:00
Aleksander
383bf3b11f move audio system to wlx-common, compress audio data, sample player 2026-01-03 15:00:47 +01:00