Thursday, January 31, 2013

Playing system sounds

Many apps in Mac OS X use system sounds to notify user about some actions, e.g. operation is finished successfully or failure. Sound can be easily played using NSSound class:
[[NSSound soundNamed:@"Hero"] play];
The above code plays Hero sound. The problem is where to find the list of all these system sounds. They can be found in the following directory.
/System/Library/Sounds
Here the list of sounds found in that directory:
Basso
Blow
Bottle
Frog
Funk
Glass
Hero
Morse
Ping
Pop
Purr
Sosumi
Submarine
Tink 

1 comment: