diff --git a/LeCountdown.xcodeproj/project.pbxproj b/LeCountdown.xcodeproj/project.pbxproj index 586dba6..b045c52 100644 --- a/LeCountdown.xcodeproj/project.pbxproj +++ b/LeCountdown.xcodeproj/project.pbxproj @@ -164,6 +164,7 @@ C4E5D67729B88BB5008E7465 /* DelaySoundPlayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4E5D67329B88734008E7465 /* DelaySoundPlayer.swift */; }; C4E5D67829B88BB5008E7465 /* DelaySoundPlayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4E5D67329B88734008E7465 /* DelaySoundPlayer.swift */; }; C4E5D67A29B8C5A1008E7465 /* VolumeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4E5D67929B8C5A1008E7465 /* VolumeView.swift */; }; + C4E5D67C29B8D4A5008E7465 /* Low_Tom_Disto_Earth.wav in Resources */ = {isa = PBXBuildFile; fileRef = C4E5D67B29B8D4A5008E7465 /* Low_Tom_Disto_Earth.wav */; }; C4F8B1532987FE6F005C86A5 /* LaunchWidgetLiveActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = C438C7D72981216200BF3EF9 /* LaunchWidgetLiveActivity.swift */; }; C4F8B15729891271005C86A5 /* Conductor.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4F8B15629891271005C86A5 /* Conductor.swift */; }; C4F8B15929891528005C86A5 /* forest_stream.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = C4F8B15829891528005C86A5 /* forest_stream.mp3 */; }; @@ -377,6 +378,7 @@ C4E5D67029B753DC008E7465 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/AppShortcuts.strings; sourceTree = ""; }; C4E5D67329B88734008E7465 /* DelaySoundPlayer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DelaySoundPlayer.swift; sourceTree = ""; }; C4E5D67929B8C5A1008E7465 /* VolumeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VolumeView.swift; sourceTree = ""; }; + C4E5D67B29B8D4A5008E7465 /* Low_Tom_Disto_Earth.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = Low_Tom_Disto_Earth.wav; sourceTree = ""; }; C4F8B15629891271005C86A5 /* Conductor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Conductor.swift; sourceTree = ""; }; C4F8B15829891528005C86A5 /* forest_stream.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = forest_stream.mp3; sourceTree = ""; }; C4F8B15E298961A7005C86A5 /* ReorderableForEach.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReorderableForEach.swift; sourceTree = ""; }; @@ -650,6 +652,7 @@ C4BA2ADC2995AB7600CB4FBA /* Stephan_Bodzin */ = { isa = PBXGroup; children = ( + C4E5D67B29B8D4A5008E7465 /* Low_Tom_Disto_Earth.wav */, C4BA2AE92995AD1C00CB4FBA /* SEM_Synths_Loop4_Nothing_Like_You.wav */, C4BA2AE72995ACC200CB4FBA /* Clave_Loop_LLL.wav */, C4BA2AE52995AC3E00CB4FBA /* Loop_ToneSD_Boavista.wav */, @@ -935,6 +938,7 @@ C4BA2AE22995ABE700CB4FBA /* SquareArp_Loop_River.wav in Resources */, C4BA2ADE2995ABA800CB4FBA /* MatriarchFxs_Loop2_Collider.wav in Resources */, C4BA2AE82995ACC200CB4FBA /* Clave_Loop_LLL.wav in Resources */, + C4E5D67C29B8D4A5008E7465 /* Low_Tom_Disto_Earth.wav in Resources */, C445FA952987D01C0054D761 /* train_horn.mp3 in Resources */, C4BA2AE02995ABD200CB4FBA /* HighChords_Loop_River.wav in Resources */, C4E5D66D29B753D7008E7465 /* AppShortcuts.strings in Resources */, diff --git a/LeCountdown/Conductor.swift b/LeCountdown/Conductor.swift index e9d53b6..4193c91 100644 --- a/LeCountdown/Conductor.swift +++ b/LeCountdown/Conductor.swift @@ -16,6 +16,10 @@ enum BGTaskIdentifier : String { case refresh = "com.staxriver.lecountdown.refresh" } +fileprivate enum Const: String { + case confirmationSound = "Low_Tom_Disto_Earth.wav" +} + class Conductor: ObservableObject { static let maestro: Conductor = Conductor() @@ -158,7 +162,7 @@ class Conductor: ObservableObject { let date = Date(timeIntervalSinceNow: countdown.duration) let soundFile = try SoundFile(fullName: countdown.soundName) - self.playSound(countdown.someSound) + self._playSound(Const.confirmationSound.rawValue) let soundPlayer = DelaySoundPlayer(soundFile: soundFile) self.delaySoundPlayer = soundPlayer @@ -241,8 +245,12 @@ class Conductor: ObservableObject { } func playSound(_ sound: Sound) { + self._playSound(sound.soundName) + } + + fileprivate func _playSound(_ filename: String) { do { - let soundFile = try sound.soundFile() + let soundFile = try SoundFile(fullName: filename) let soundPlayer = SoundPlayer() self.soundPlayer = soundPlayer try soundPlayer.playSound(soundFile: soundFile, repeats: false) diff --git a/LeCountdown/Sound_Assets/Stephan_Bodzin/Low_Tom_Disto_Earth.wav b/LeCountdown/Sound_Assets/Stephan_Bodzin/Low_Tom_Disto_Earth.wav new file mode 100644 index 0000000..d80091b Binary files /dev/null and b/LeCountdown/Sound_Assets/Stephan_Bodzin/Low_Tom_Disto_Earth.wav differ