From 70abbf9eff7cd48cc6a3c61d8eb7f04712d5a966 Mon Sep 17 00:00:00 2001 From: Laurent Date: Wed, 19 Apr 2023 16:43:31 +0200 Subject: [PATCH] Fix issue --- LeCountdown/AppDelegate.swift | 4 ++-- LeCountdown/Conductor.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LeCountdown/AppDelegate.swift b/LeCountdown/AppDelegate.swift index 15e10ee..e5de4eb 100644 --- a/LeCountdown/AppDelegate.swift +++ b/LeCountdown/AppDelegate.swift @@ -27,7 +27,7 @@ class AppDelegate : NSObject, UIApplicationDelegate { UNUserNotificationCenter.current().delegate = self self._initSchemaIfNeeded() -// self._activateAudioSession() + self._activateAudioSession() Sound.computeSoundDurationsIfNecessary() @@ -41,7 +41,7 @@ class AppDelegate : NSObject, UIApplicationDelegate { } func applicationWillEnterForeground(_ application: UIApplication) { - self._activateAudioSession() +// self._activateAudioSession() } func applicationWillTerminate(_ application: UIApplication) { diff --git a/LeCountdown/Conductor.swift b/LeCountdown/Conductor.swift index 8acedb9..c628335 100644 --- a/LeCountdown/Conductor.swift +++ b/LeCountdown/Conductor.swift @@ -253,9 +253,9 @@ class Conductor: ObservableObject { do { let sound: Sound = countdown.someSound let soundPlayer = try DelaySoundPlayer(timerID: countdownId, sound: sound) - self._delayedSoundPlayers[countdown.stringId] = soundPlayer - FileLogger.log("Restored sound player for \(self._timerName(countdownId))") + self._delayedSoundPlayers[countdownId] = soundPlayer try soundPlayer.restore(for: interval.end, repeatCount: Int(countdown.repeatCount)) + FileLogger.log("Restored sound player for \(self._timerName(countdownId))") } catch { Logger.error(error) }