From 39d718fa8eebcc8e514c0645c817412707f8ef57 Mon Sep 17 00:00:00 2001 From: Hugo Pezziardi Date: Thu, 14 Sep 2023 18:03:14 +0200 Subject: [PATCH 1/6] :bento: (GameEngineKit): Add the 6 DanceFreeze songs --- Modules/GameEngineKit/Resources/Sounds/Early_Bird.mp3 | 3 +++ Modules/GameEngineKit/Resources/Sounds/Empty_Page.mp3 | 3 +++ Modules/GameEngineKit/Resources/Sounds/Giggly_Squirrel.mp3 | 3 +++ Modules/GameEngineKit/Resources/Sounds/Hands_On.mp3 | 3 +++ Modules/GameEngineKit/Resources/Sounds/Happy_Days.mp3 | 3 +++ Modules/GameEngineKit/Resources/Sounds/In_The_Game.mp3 | 3 +++ Modules/GameEngineKit/Resources/Sounds/Little_by_little.mp3 | 3 +++ 7 files changed, 21 insertions(+) create mode 100755 Modules/GameEngineKit/Resources/Sounds/Early_Bird.mp3 create mode 100755 Modules/GameEngineKit/Resources/Sounds/Empty_Page.mp3 create mode 100755 Modules/GameEngineKit/Resources/Sounds/Giggly_Squirrel.mp3 create mode 100755 Modules/GameEngineKit/Resources/Sounds/Hands_On.mp3 create mode 100755 Modules/GameEngineKit/Resources/Sounds/Happy_Days.mp3 create mode 100755 Modules/GameEngineKit/Resources/Sounds/In_The_Game.mp3 create mode 100755 Modules/GameEngineKit/Resources/Sounds/Little_by_little.mp3 diff --git a/Modules/GameEngineKit/Resources/Sounds/Early_Bird.mp3 b/Modules/GameEngineKit/Resources/Sounds/Early_Bird.mp3 new file mode 100755 index 0000000000..3522762e46 --- /dev/null +++ b/Modules/GameEngineKit/Resources/Sounds/Early_Bird.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf9656eb631c433ad9729ad085e667e9b8ec465a13f277f9760130a14c408d79 +size 3459953 diff --git a/Modules/GameEngineKit/Resources/Sounds/Empty_Page.mp3 b/Modules/GameEngineKit/Resources/Sounds/Empty_Page.mp3 new file mode 100755 index 0000000000..9ba5848d35 --- /dev/null +++ b/Modules/GameEngineKit/Resources/Sounds/Empty_Page.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf32c9c79fc7dc8a7f7c9f36466e3c4ae2098ab40befb8780c0ee6329e88f264 +size 2007157 diff --git a/Modules/GameEngineKit/Resources/Sounds/Giggly_Squirrel.mp3 b/Modules/GameEngineKit/Resources/Sounds/Giggly_Squirrel.mp3 new file mode 100755 index 0000000000..654c27a5f8 --- /dev/null +++ b/Modules/GameEngineKit/Resources/Sounds/Giggly_Squirrel.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f961c51717d0de88fbbf8454db50ffc19d8646b2a9426ec4431311c8dc6ba93b +size 1961940 diff --git a/Modules/GameEngineKit/Resources/Sounds/Hands_On.mp3 b/Modules/GameEngineKit/Resources/Sounds/Hands_On.mp3 new file mode 100755 index 0000000000..5d48a09ae0 --- /dev/null +++ b/Modules/GameEngineKit/Resources/Sounds/Hands_On.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:066d9ef4222aa52d9de31b6700aca5d6cf53442eb7a1b206c6da24b1fe31ad67 +size 2671715 diff --git a/Modules/GameEngineKit/Resources/Sounds/Happy_Days.mp3 b/Modules/GameEngineKit/Resources/Sounds/Happy_Days.mp3 new file mode 100755 index 0000000000..faac2479ed --- /dev/null +++ b/Modules/GameEngineKit/Resources/Sounds/Happy_Days.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f420e8c34b7b6e887d43976c29436015fc3967958ac611db3d0466e547682ed8 +size 3768736 diff --git a/Modules/GameEngineKit/Resources/Sounds/In_The_Game.mp3 b/Modules/GameEngineKit/Resources/Sounds/In_The_Game.mp3 new file mode 100755 index 0000000000..b8139f8e71 --- /dev/null +++ b/Modules/GameEngineKit/Resources/Sounds/In_The_Game.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7dee0c3f6d1dc92421ded4c233f9ce81d1d94b4eb84e2c29bc796441ed485032 +size 3540931 diff --git a/Modules/GameEngineKit/Resources/Sounds/Little_by_little.mp3 b/Modules/GameEngineKit/Resources/Sounds/Little_by_little.mp3 new file mode 100755 index 0000000000..bdf2f310a3 --- /dev/null +++ b/Modules/GameEngineKit/Resources/Sounds/Little_by_little.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ebe235348bc17e68864e0b32e92b6763f5b4eab6754af423b188b58859ac5851 +size 3331314 From 4dd9254d764af47ae11d28cf088535b6c5fb4db4 Mon Sep 17 00:00:00 2001 From: Hugo Pezziardi Date: Thu, 14 Sep 2023 18:04:13 +0200 Subject: [PATCH 2/6] :bug: (GameEngineKit): AudioPlayer uses Bundle.module to use its own resources --- Modules/GameEngineKit/Sources/Utils/AudioPlayer.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/GameEngineKit/Sources/Utils/AudioPlayer.swift b/Modules/GameEngineKit/Sources/Utils/AudioPlayer.swift index 89fbbfdf42..c9c8339ea1 100644 --- a/Modules/GameEngineKit/Sources/Utils/AudioPlayer.swift +++ b/Modules/GameEngineKit/Sources/Utils/AudioPlayer.swift @@ -25,8 +25,8 @@ public class AudioPlayer: NSObject, ObservableObject { didFinishPlaying = false do { - let path = Bundle.main.path(forResource: audioRecording.file, ofType: "mp3")! - player = try AVAudioPlayer(contentsOf: URL(fileURLWithPath: path)) + let fileUrl = Bundle.module.url(forResource: audioRecording.file, withExtension: "mp3")! + player = try AVAudioPlayer(contentsOf: fileUrl) player.delegate = self } catch { print("ERROR - mp3 file not found - \(error)") From 697c1680694e2c6390705c503fd7db473948442e Mon Sep 17 00:00:00 2001 From: Hugo Pezziardi Date: Thu, 14 Sep 2023 18:06:37 +0200 Subject: [PATCH 3/6] :sparkles: (GameEngineKit): Make the new 6 songs available in DanceFreeze --- .../Interface/Components/SongSelector.swift | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Modules/GameEngineKit/Sources/Specific/DanceFreeze/Interface/Components/SongSelector.swift b/Modules/GameEngineKit/Sources/Specific/DanceFreeze/Interface/Components/SongSelector.swift index d5df48bf7b..3648265d7d 100644 --- a/Modules/GameEngineKit/Sources/Specific/DanceFreeze/Interface/Components/SongSelector.swift +++ b/Modules/GameEngineKit/Sources/Specific/DanceFreeze/Interface/Components/SongSelector.swift @@ -6,13 +6,12 @@ import DesignKit import SwiftUI public let kAvailableSongs: [AudioRecordingModel] = [ - // TO DO : (@hugo) Replace nyan by validated free use music - AudioRecordingModel(name: "Frère Jacques", file: "nyan"), - AudioRecordingModel(name: "Dansons la Capucine", file: "nyan"), - AudioRecordingModel(name: "Petit Escargot", file: "nyan"), - AudioRecordingModel(name: "Stairway to Heaven", file: "nyan"), - AudioRecordingModel(name: "Can you feel the love tonight", file: "nyan"), - AudioRecordingModel(name: "Cette année là", file: "nyan"), + AudioRecordingModel(name: "Giggly squirrel", file: "Giggly_Squirrel"), + AudioRecordingModel(name: "Empty page", file: "Empty_Page"), + AudioRecordingModel(name: "Early bird", file: "Early_Bird"), + AudioRecordingModel(name: "Hands on", file: "Hands_On"), + AudioRecordingModel(name: "In the game", file: "In_The_Game"), + AudioRecordingModel(name: "Little by little", file: "Little_by_little"), ] struct SongSelector: View { From ed9b7cfc02bfb8996c195ddb8f229193d3ec85bc Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Fri, 15 Sep 2023 16:22:41 +0200 Subject: [PATCH 4/6] :fire: (UIExplorer): Remove nyan cat files and references --- Apps/LekaActivityUIExplorer/Resources/Sounds/nyan.mp3 | 3 --- .../Sources/OldUI/ActivityTemplates/ExplorerActivity.swift | 2 +- Modules/GameEngineKit/Resources/Sounds/nyan.mp3 | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 Apps/LekaActivityUIExplorer/Resources/Sounds/nyan.mp3 delete mode 100644 Modules/GameEngineKit/Resources/Sounds/nyan.mp3 diff --git a/Apps/LekaActivityUIExplorer/Resources/Sounds/nyan.mp3 b/Apps/LekaActivityUIExplorer/Resources/Sounds/nyan.mp3 deleted file mode 100644 index 36422480e3..0000000000 --- a/Apps/LekaActivityUIExplorer/Resources/Sounds/nyan.mp3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b30105cfa4a88292d7d2da1f3e9d212e772c21f9aa193d054f0cc135e5dc68ec -size 6702896 diff --git a/Apps/LekaActivityUIExplorer/Sources/OldUI/ActivityTemplates/ExplorerActivity.swift b/Apps/LekaActivityUIExplorer/Sources/OldUI/ActivityTemplates/ExplorerActivity.swift index 5c56e9f41c..0374e529a8 100644 --- a/Apps/LekaActivityUIExplorer/Sources/OldUI/ActivityTemplates/ExplorerActivity.swift +++ b/Apps/LekaActivityUIExplorer/Sources/OldUI/ActivityTemplates/ExplorerActivity.swift @@ -151,7 +151,7 @@ class ExplorerActivity: ObservableObject { case .listenThenTouchToSelect: return ["guitar"] case .danceFreeze: - return ["nyan"] + return ["guitar"] default: return nil } diff --git a/Modules/GameEngineKit/Resources/Sounds/nyan.mp3 b/Modules/GameEngineKit/Resources/Sounds/nyan.mp3 deleted file mode 100644 index 36422480e3..0000000000 --- a/Modules/GameEngineKit/Resources/Sounds/nyan.mp3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b30105cfa4a88292d7d2da1f3e9d212e772c21f9aa193d054f0cc135e5dc68ec -size 6702896 From 0c4e0ed537b6c3050a8686d582daba7bd1f96b2a Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Fri, 15 Sep 2023 16:28:26 +0200 Subject: [PATCH 5/6] :pencil2: (GameEngineKit): Fix case for dance freeze songs --- .../Interface/Components/SongSelector.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Modules/GameEngineKit/Sources/Specific/DanceFreeze/Interface/Components/SongSelector.swift b/Modules/GameEngineKit/Sources/Specific/DanceFreeze/Interface/Components/SongSelector.swift index 3648265d7d..45f49930f9 100644 --- a/Modules/GameEngineKit/Sources/Specific/DanceFreeze/Interface/Components/SongSelector.swift +++ b/Modules/GameEngineKit/Sources/Specific/DanceFreeze/Interface/Components/SongSelector.swift @@ -6,12 +6,12 @@ import DesignKit import SwiftUI public let kAvailableSongs: [AudioRecordingModel] = [ - AudioRecordingModel(name: "Giggly squirrel", file: "Giggly_Squirrel"), - AudioRecordingModel(name: "Empty page", file: "Empty_Page"), - AudioRecordingModel(name: "Early bird", file: "Early_Bird"), - AudioRecordingModel(name: "Hands on", file: "Hands_On"), - AudioRecordingModel(name: "In the game", file: "In_The_Game"), - AudioRecordingModel(name: "Little by little", file: "Little_by_little"), + AudioRecordingModel(name: "Giggly Squirrel", file: "Giggly_Squirrel"), + AudioRecordingModel(name: "Empty Page", file: "Empty_Page"), + AudioRecordingModel(name: "Early Bird", file: "Early_Bird"), + AudioRecordingModel(name: "Hands On", file: "Hands_On"), + AudioRecordingModel(name: "In The Game", file: "In_The_Game"), + AudioRecordingModel(name: "Little by Little", file: "Little_by_little"), ] struct SongSelector: View { From eeba9b89125189f47fd9075a247fdd7dd4ed9f06 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Fri, 15 Sep 2023 16:30:26 +0200 Subject: [PATCH 6/6] :truck: (GameEngineKit): Move mp3 to specific directories --- .../Resources/Sounds/{ => DanceFreeze}/Early_Bird.mp3 | 0 .../Resources/Sounds/{ => DanceFreeze}/Empty_Page.mp3 | 0 .../Resources/Sounds/{ => DanceFreeze}/Giggly_Squirrel.mp3 | 0 .../GameEngineKit/Resources/Sounds/{ => DanceFreeze}/Hands_On.mp3 | 0 .../Resources/Sounds/{ => DanceFreeze}/Happy_Days.mp3 | 0 .../Resources/Sounds/{ => DanceFreeze}/In_The_Game.mp3 | 0 .../Resources/Sounds/{ => DanceFreeze}/Little_by_little.mp3 | 0 Modules/GameEngineKit/Resources/Sounds/{ => Misc}/guitar.mp3 | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename Modules/GameEngineKit/Resources/Sounds/{ => DanceFreeze}/Early_Bird.mp3 (100%) rename Modules/GameEngineKit/Resources/Sounds/{ => DanceFreeze}/Empty_Page.mp3 (100%) rename Modules/GameEngineKit/Resources/Sounds/{ => DanceFreeze}/Giggly_Squirrel.mp3 (100%) rename Modules/GameEngineKit/Resources/Sounds/{ => DanceFreeze}/Hands_On.mp3 (100%) rename Modules/GameEngineKit/Resources/Sounds/{ => DanceFreeze}/Happy_Days.mp3 (100%) rename Modules/GameEngineKit/Resources/Sounds/{ => DanceFreeze}/In_The_Game.mp3 (100%) rename Modules/GameEngineKit/Resources/Sounds/{ => DanceFreeze}/Little_by_little.mp3 (100%) rename Modules/GameEngineKit/Resources/Sounds/{ => Misc}/guitar.mp3 (100%) diff --git a/Modules/GameEngineKit/Resources/Sounds/Early_Bird.mp3 b/Modules/GameEngineKit/Resources/Sounds/DanceFreeze/Early_Bird.mp3 similarity index 100% rename from Modules/GameEngineKit/Resources/Sounds/Early_Bird.mp3 rename to Modules/GameEngineKit/Resources/Sounds/DanceFreeze/Early_Bird.mp3 diff --git a/Modules/GameEngineKit/Resources/Sounds/Empty_Page.mp3 b/Modules/GameEngineKit/Resources/Sounds/DanceFreeze/Empty_Page.mp3 similarity index 100% rename from Modules/GameEngineKit/Resources/Sounds/Empty_Page.mp3 rename to Modules/GameEngineKit/Resources/Sounds/DanceFreeze/Empty_Page.mp3 diff --git a/Modules/GameEngineKit/Resources/Sounds/Giggly_Squirrel.mp3 b/Modules/GameEngineKit/Resources/Sounds/DanceFreeze/Giggly_Squirrel.mp3 similarity index 100% rename from Modules/GameEngineKit/Resources/Sounds/Giggly_Squirrel.mp3 rename to Modules/GameEngineKit/Resources/Sounds/DanceFreeze/Giggly_Squirrel.mp3 diff --git a/Modules/GameEngineKit/Resources/Sounds/Hands_On.mp3 b/Modules/GameEngineKit/Resources/Sounds/DanceFreeze/Hands_On.mp3 similarity index 100% rename from Modules/GameEngineKit/Resources/Sounds/Hands_On.mp3 rename to Modules/GameEngineKit/Resources/Sounds/DanceFreeze/Hands_On.mp3 diff --git a/Modules/GameEngineKit/Resources/Sounds/Happy_Days.mp3 b/Modules/GameEngineKit/Resources/Sounds/DanceFreeze/Happy_Days.mp3 similarity index 100% rename from Modules/GameEngineKit/Resources/Sounds/Happy_Days.mp3 rename to Modules/GameEngineKit/Resources/Sounds/DanceFreeze/Happy_Days.mp3 diff --git a/Modules/GameEngineKit/Resources/Sounds/In_The_Game.mp3 b/Modules/GameEngineKit/Resources/Sounds/DanceFreeze/In_The_Game.mp3 similarity index 100% rename from Modules/GameEngineKit/Resources/Sounds/In_The_Game.mp3 rename to Modules/GameEngineKit/Resources/Sounds/DanceFreeze/In_The_Game.mp3 diff --git a/Modules/GameEngineKit/Resources/Sounds/Little_by_little.mp3 b/Modules/GameEngineKit/Resources/Sounds/DanceFreeze/Little_by_little.mp3 similarity index 100% rename from Modules/GameEngineKit/Resources/Sounds/Little_by_little.mp3 rename to Modules/GameEngineKit/Resources/Sounds/DanceFreeze/Little_by_little.mp3 diff --git a/Modules/GameEngineKit/Resources/Sounds/guitar.mp3 b/Modules/GameEngineKit/Resources/Sounds/Misc/guitar.mp3 similarity index 100% rename from Modules/GameEngineKit/Resources/Sounds/guitar.mp3 rename to Modules/GameEngineKit/Resources/Sounds/Misc/guitar.mp3