feat(audio): async play test sound (#375)
Co-authored-by: CJ Pais <cj@cjpais.com>
This commit is contained in:
parent
c8389f34b2
commit
dbd8827bb2
2 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue