feat(audio): async play test sound (#375)

Co-authored-by: CJ Pais <cj@cjpais.com>
This commit is contained in:
Maicon Moreira 2025-11-27 07:46:41 -03:00 committed by GitHub
parent c8389f34b2
commit dbd8827bb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -63,7 +63,7 @@ pub fn play_feedback_sound_blocking(app: &AppHandle, sound_type: SoundType) {
pub fn play_test_sound(app: &AppHandle, sound_type: SoundType) {
let settings = settings::get_settings(app);
if let Some(path) = resolve_sound_path(app, &settings, sound_type) {
play_sound_async(app, path);
play_sound_blocking(app, &path);
}
}

View file

@ -160,7 +160,7 @@ pub fn get_selected_output_device(app: AppHandle) -> Result<String, String> {
#[tauri::command]
#[specta::specta]
pub fn play_test_sound(app: AppHandle, sound_type: String) {
pub async fn play_test_sound(app: AppHandle, sound_type: String) {
let sound = match sound_type.as_str() {
"start" => audio_feedback::SoundType::Start,
"stop" => audio_feedback::SoundType::Stop,