move audio system to wlx-common, compress audio data, sample player
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user