From 7bd846fb8c00a917a35c28a5cb7d6980602a337d Mon Sep 17 00:00:00 2001 From: Laurent Date: Mon, 6 Feb 2023 15:22:00 +0100 Subject: [PATCH] Remove looping sounds --- LeCountdown/Sound/SoundPlayer.swift | 4 ++-- LeCountdown/Views/SoundImageFormView.swift | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/LeCountdown/Sound/SoundPlayer.swift b/LeCountdown/Sound/SoundPlayer.swift index d7b6b2a..5dbcd6c 100644 --- a/LeCountdown/Sound/SoundPlayer.swift +++ b/LeCountdown/Sound/SoundPlayer.swift @@ -48,8 +48,8 @@ class SoundPlayer { _player = try AVAudioPlayer(contentsOf: url) _player?.prepareToPlay() - let loopCount = repeats ? Int.max : 0 - _player?.numberOfLoops = loopCount +// let loopCount = repeats ? Int.max : 0 + _player?.numberOfLoops = 0 //loopCount _player?.volume = 1.0 // do { diff --git a/LeCountdown/Views/SoundImageFormView.swift b/LeCountdown/Views/SoundImageFormView.swift index 0c964e3..2060bee 100644 --- a/LeCountdown/Views/SoundImageFormView.swift +++ b/LeCountdown/Views/SoundImageFormView.swift @@ -46,9 +46,9 @@ struct SoundImageFormView : View { } } - if self.repeatsBinding != nil { - Toggle("Sound repeats", isOn: repeatsBinding!) - } +// if self.repeatsBinding != nil { +// Toggle("Sound repeats", isOn: repeatsBinding!) +// } } Section(header: Text("Background")) {