From e793ca8317cf2994dd964202be16c75c0381f858 Mon Sep 17 00:00:00 2001 From: Fedor Logachev Date: Tue, 21 May 2024 12:21:13 -0600 Subject: [PATCH] audio: Fix load_audio being stuck forever without audio feature --- src/audio.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/audio.rs b/src/audio.rs index c76b6ccd..f6eaf7aa 100644 --- a/src/audio.rs +++ b/src/audio.rs @@ -43,7 +43,7 @@ mod dummy_audio { pub fn set_volume(&self, _ctx: &mut AudioContext, _volume: f32) {} pub fn is_loaded(&self) -> bool { - false + true } pub fn delete(&self, _ctx: &AudioContext) {} @@ -102,6 +102,7 @@ impl std::fmt::Debug for Sound { /// Load audio file. /// /// Attempts to automatically detect the format of the source of data. + pub async fn load_sound(path: &str) -> Result { let data = load_file(path).await?;