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 UNUserNotificationCenter.current().delegate = self
self._initSchemaIfNeeded() self._initSchemaIfNeeded()
// self._activateAudioSession() self._activateAudioSession()
Sound.computeSoundDurationsIfNecessary() Sound.computeSoundDurationsIfNecessary()
@ -41,7 +41,7 @@ class AppDelegate : NSObject, UIApplicationDelegate {
} }
func applicationWillEnterForeground(_ application: UIApplication) { func applicationWillEnterForeground(_ application: UIApplication) {
self._activateAudioSession() // self._activateAudioSession()
} }
func applicationWillTerminate(_ application: UIApplication) { func applicationWillTerminate(_ application: UIApplication) {

@ -253,9 +253,9 @@ class Conductor: ObservableObject {
do { do {
let sound: Sound = countdown.someSound let sound: Sound = countdown.someSound
let soundPlayer = try DelaySoundPlayer(timerID: countdownId, sound: sound) let soundPlayer = try DelaySoundPlayer(timerID: countdownId, sound: sound)
self._delayedSoundPlayers[countdown.stringId] = soundPlayer self._delayedSoundPlayers[countdownId] = soundPlayer
FileLogger.log("Restored sound player for \(self._timerName(countdownId))")
try soundPlayer.restore(for: interval.end, repeatCount: Int(countdown.repeatCount)) try soundPlayer.restore(for: interval.end, repeatCount: Int(countdown.repeatCount))
FileLogger.log("Restored sound player for \(self._timerName(countdownId))")
} catch { } catch {
Logger.error(error) Logger.error(error)
} }

Loading…
Cancel
Save