main
Laurent 3 years ago
parent b873be1e29
commit 70abbf9eff
  1. 4
      LeCountdown/AppDelegate.swift
  2. 4
      LeCountdown/Conductor.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) {

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

Loading…
Cancel
Save