-
Notifications
You must be signed in to change notification settings - Fork 31
Add Manage Callouts toggles for sound effects and delays #258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| // Soundscape | ||
| // | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Copyright (c) Soundscape Community Contributors. | ||
| // Licensed under the MIT License. | ||
| // | ||
|
|
||
|
|
@@ -25,7 +26,7 @@ struct IntersectionCallout: CalloutProtocol { | |
| return "intersection" | ||
| } | ||
|
|
||
| let includePrefixSound = true | ||
| let includePrefixSound: Bool | ||
|
|
||
| var prefixSound: Sound? { | ||
| return GlyphSound(SuperCategory.intersections.glyph) | ||
|
|
@@ -38,11 +39,12 @@ struct IntersectionCallout: CalloutProtocol { | |
| return SpatialDataCache.intersectionByKey(key) | ||
| } | ||
|
|
||
| init(_ calloutOrigin: CalloutOrigin, _ intersectionKey: String, _ isRoundabout: Bool = false, _ userHeading: CLLocationDirection) { | ||
| init(_ calloutOrigin: CalloutOrigin, _ intersectionKey: String, _ isRoundabout: Bool = false, _ userHeading: CLLocationDirection, _ includePrefixSound: Bool = true) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make Line 42 sets a default Suggested fix- init(_ calloutOrigin: CalloutOrigin, _ intersectionKey: String, _ isRoundabout: Bool = false, _ userHeading: CLLocationDirection, _ includePrefixSound: Bool = true) {
+ init(_ calloutOrigin: CalloutOrigin, _ intersectionKey: String, _ isRoundabout: Bool = false, _ userHeading: CLLocationDirection, _ includePrefixSound: Bool) {🤖 Prompt for AI Agents |
||
| self.origin = calloutOrigin | ||
| self.key = intersectionKey | ||
| self.isRoundabout = isRoundabout | ||
| self.heading = userHeading | ||
| self.includePrefixSound = includePrefixSound | ||
| } | ||
|
|
||
| func sounds(for location: CLLocation?, isRepeat: Bool, automotive: Bool = false) -> Sounds { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Require explicit
includePrefixSoundfor destination callouts.Line 56 defaults to
true, so callers can omit the new setting.PreviewGenerator.swift(Line 100) currently does that, which keeps preview prefix sounds enabled regardless of the Sound Effects toggle.Suggested fix
🤖 Prompt for AI Agents