@@ -31,9 +31,9 @@ public extension Control {
3131 public static var isMuted = false {
3232 didSet {
3333 if isMuted {
34- mutedVolumeLevel = volume
34+ Helpers . mutedVolumeLevel = volume
3535 }
36- volume = isMuted ? 0 : mutedVolumeLevel
36+ volume = isMuted ? 0 : Helpers . mutedVolumeLevel
3737 }
3838 }
3939
@@ -44,7 +44,7 @@ public extension Control {
4444 /// - Important: Calling this function will _unmute_ the system volume. The increment amount is
4545 /// applied to the volume level prior to it being muted.
4646 public static func increaseVolume(
47- @BetweenZeroAndOneInclusive _ amount: Float = defaultVolumeStep
47+ @BetweenZeroAndOneInclusive _ amount: Float = Helpers . defaultVolumeStep
4848 ) {
4949 if isMuted {
5050 isMuted. toggle ( )
@@ -59,7 +59,7 @@ public extension Control {
5959 /// - Important: Calling this function will _unmute_ the system volume. The decrement amount is
6060 /// applied to the volume level prior to it being muted.
6161 public static func decreaseVolume(
62- @BetweenZeroAndOneInclusive _ amount: Float = defaultVolumeStep
62+ @BetweenZeroAndOneInclusive _ amount: Float = Helpers . defaultVolumeStep
6363 ) {
6464 if isMuted {
6565 isMuted. toggle ( )
@@ -71,12 +71,15 @@ public extension Control {
7171
7272extension Control . Volume {
7373
74- /// Refers to the volume level prior to it being muted.
75- private static var mutedVolumeLevel : Float = 0
76-
77- /// Refers to the amount (on scale from 0 to 1) the volume is incremented/decremented when the volume rocker is pressed on the phone.
78- public static let defaultVolumeStep : Float = 1 / maxVolumeButtonPresses
79-
80- /// Refers to the number of (volume rocker) button presses it takes for the phone's volume to go from 0 to max.
81- private static let maxVolumeButtonPresses : Float = 16
74+ public enum Helpers {
75+
76+ /// Refers to the amount (on scale from 0 to 1) the volume is incremented/decremented when the volume rocker is pressed on the phone.
77+ public static let defaultVolumeStep : Float = 1 / maxVolumeButtonPresses
78+
79+ /// Refers to the volume level prior to it being muted.
80+ static var mutedVolumeLevel : Float = 0
81+
82+ /// Refers to the number of (volume rocker) button presses it takes for the phone's volume to go from 0 to max.
83+ private static let maxVolumeButtonPresses : Float = 16
84+ }
8285}
0 commit comments