diff -r e9f7ba4718e1 -r af9b2b929b03 Source/GGBUtils.m --- a/Source/GGBUtils.m Fri Mar 07 11:43:02 2008 -0800 +++ b/Source/GGBUtils.m Wed Mar 12 15:51:32 2008 -0700 @@ -20,6 +20,10 @@ */ #import "GGBUtils.h" +#if TARGET_OS_ASPEN +#import +#endif + void setObj( id *variable, id newValue ) { @@ -36,3 +40,28 @@ *variable = [(id)newValue copy]; } } + + +void PlaySound( NSString* name ) +{ +#if TARGET_OS_ASPEN + NSURL *url = [NSURL fileURLWithPath: [@"/Library/Sounds/" stringByAppendingPathComponent: name]]; + SystemSoundID soundID; + if( AudioServicesCreateSystemSoundID((CFURLRef)url,&soundID) != noErr ) { + NSLog(@"Couldn't load sound %@",url); + return; + } + AudioServicesPlaySystemSound(soundID); +#else + [[NSSound soundNamed: name] play]; +#endif +} + +void Beep() +{ +#if TARGET_OS_ASPEN + AudioServicesPlaySystemSound(kSystemSoundID_UserPreferredAlert); +#else + NSBeep(); +#endif +}