CocoaExtension // Fix some parameters used in buzz().

This commit is contained in:
ShikiSuen 2023-02-06 19:14:28 +08:00
parent c0d6aab456
commit f899e900c9
1 changed files with 3 additions and 3 deletions

View File

@ -18,13 +18,13 @@ extension NSSound {
AudioServicesPlaySystemSound(soundID)
}
public static func buzz(fart _: Bool = false, count: Int) {
public static func buzz(fart: Bool = false, count: Int) {
if count <= 1 {
NSSound.buzz()
NSSound.buzz(fart: fart)
return
}
for _ in 0...count {
NSSound.buzz()
NSSound.buzz(fart: fart)
usleep(500_000)
}
}