Skip to content

Commit 14122e2

Browse files
committed
Now sounds more or less as expected in macOS 10.16 aka 10.11, where the old system alert sound "Submarine" has been replaced with new sound "Submerge".
1 parent 7e15058 commit 14122e2

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

SSYAlertSounder.m

+13
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,19 @@ - (NSArray*)availableSoundsSorted {
126126

127127

128128
- (void)playAlertSoundNamed:(NSString*)name {
129+
/* In macOS 10.16 aka macOS 11, the "Submarine" sound has been replaced
130+
by a similar sound, "Submerge". Why, oh Apple, why ?? */
131+
if (@available(macOS 10.16, *)) {
132+
if ([name isEqualToString:@"Submarine"]) {
133+
name = @"Submerge";
134+
}
135+
}
136+
else {
137+
if ([name isEqualToString:@"Submerge"]) {
138+
name = @"Submarine";
139+
}
140+
}
141+
129142
if (!name) {
130143
return ;
131144
}

SSYSemaphore.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ float randomPeriod(float min, float max) {
245245
// there is a BUG in SSYSemaphore. The whole idea of SSYSemaphore
246246
// is to prevent such collisions!
247247
NSLog(@"COLLISION!! Expected:%@ Read:%@", [self key], readKey) ;
248-
[[NSSound soundNamed:@"Submarine"] play] ;
248+
[[NSSound soundNamed:@"Submerge"] play] ;
249249
}
250250

251251
[readKey release] ;

0 commit comments

Comments
 (0)