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) }