Skip to content

Commit

Permalink
playSuccessSound method added. (Call via [self playSuccessSound:Y/N]
Browse files Browse the repository at this point in the history
  • Loading branch information
Zettt authored and halbtuerke committed Jun 19, 2009
1 parent 104be21 commit 65530e3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion AppController.m
Expand Up @@ -353,6 +353,18 @@ - (IBAction)openHelp:(id)sender

}

# pragma mark successful/failed sounds

- (void)playSuccessSound:(BOOL)success
{
// system sounds in /Library/Sounds and ~/Library/Sounds will be played automatically when NSSound is used
if (success == YES) {
NSSound *successSound = [NSSound soundNamed:@"complete"];
[successSound play];
} else if (success == NO) {
NSSound *successSound = [NSSound soundNamed:@"Basso"];
[successSound play];
}
}

@end
@end

0 comments on commit 65530e3

Please sign in to comment.