move audio system to wlx-common, compress audio data, sample player

This commit is contained in:
Aleksander
2026-01-02 00:19:17 +01:00
parent b6c16dff18
commit 383bf3b11f
17 changed files with 132 additions and 116 deletions
+2 -3
View File
@@ -325,10 +325,9 @@ impl KeyboardState {
}
}
const KEY_AUDIO_WAV: &[u8] = include_bytes!("../../res/421581.wav");
fn play_key_click(app: &mut AppState) {
app.audio_provider.play(KEY_AUDIO_WAV);
app.audio_sample_player
.play_sample(&mut app.audio_system, "key_click");
}
struct KeyState {
+2 -1
View File
@@ -67,7 +67,8 @@ impl Toast {
let destroy_at = instant.add(std::time::Duration::from_secs_f32(self.timeout));
if self.sound && app.session.config.notifications_sound_enabled {
app.audio_provider.play(app.toast_sound);
app.audio_sample_player
.play_sample(&mut app.audio_system, "toast");
}
// drop any toast that was created before us.