Skip to content

Commit

Permalink
deltaskins fix sounds loading
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Mattiello <[email protected]>
  • Loading branch information
JoeMatt committed Feb 3, 2025
1 parent f0cdfbe commit c14dac3
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ public enum ButtonSound: String, Codable, Equatable, UserDefaultsRepresentable,
case click2 = "click2"
case tap2 = "tap2"
case click3 = "click3"
case tap3 = "tap3"
case `switch` = "switch"

public var description: String {
Expand All @@ -154,8 +153,6 @@ public enum ButtonSound: String, Codable, Equatable, UserDefaultsRepresentable,
return "Tap 2"
case .click3:
return "Click 3"
case .tap3:
return "Tap 3"
case .switch:
return "Switch"
}
Expand All @@ -176,11 +173,9 @@ public enum ButtonSound: String, Codable, Equatable, UserDefaultsRepresentable,
case .click2:
return "Mechanical click sound"
case .tap2:
return "Soft tap sound"
return "Sharp tap sound"
case .click3:
return "Thudding click sound"
case .tap3:
return "Sharp tap sound"
case .switch:
return "Mechaniacal switch sound"
}
Expand All @@ -203,8 +198,6 @@ public enum ButtonSound: String, Codable, Equatable, UserDefaultsRepresentable,
return "button-click3"
case .tap2:
return "button-tap2"
case .tap3:
return "button-tap3"
case .switch:
return "button-switch"
}
Expand Down
2 changes: 1 addition & 1 deletion PVUI/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ let package = Package(
resources: [
.copy("Resources/Shaders/fsh"),
.copy("Resources/Shaders/GLES"),
.process("Resources/Sounds"),
.copy("Resources/Sounds"),
.process("Resources/Shaders/Metal"),
.process("Resources/SystemIcons.xcassets"),
.process("Resources/Assets.xcassets"),
Expand Down
2 changes: 1 addition & 1 deletion PVUI/Sources/PVUIBase/Audio/ButtonSoundGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public final class ButtonSoundGenerator {
for sound in ButtonSound.allCases where sound != .none {
guard let url = Bundle.module.url(forResource: sound.filename,
withExtension: "wav",
subdirectory: "ButtonSounds"),
subdirectory: "Sounds/ButtonSounds"),
let file = try? AVAudioFile(forReading: url) else {
ELOG("Failed to load sound file: \(sound.filename).wav")
continue
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit c14dac3

Please sign in to comment.