diff options
Diffstat (limited to 'DomeKey/Sounds.m')
-rw-r--r-- | DomeKey/Sounds.m | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/DomeKey/Sounds.m b/DomeKey/Sounds.m index 8bc2790..7378b3c 100644 --- a/DomeKey/Sounds.m +++ b/DomeKey/Sounds.m @@ -8,6 +8,32 @@ #import "Sounds.h" +#import "sound_data.h" + @implementation Sounds +- (instancetype)init +{ + self = [super init]; + if (self) { + _mode_activated = [[NSSound alloc] initWithData:[NSData + dataWithBytes:sounds_mode_activated_mp3 + length:sounds_mode_activated_mp3_len]]; + _mode_deactivated = [[NSSound alloc] initWithData:[NSData + dataWithBytes:sounds_mode_deactivated_mp3 + length:sounds_mode_deactivated_mp3_len]]; + } + return self; +} + +- (void)playModeActivated +{ + [_mode_activated play]; +} + +- (void)playModeDeactivated +{ + [_mode_deactivated play]; +} + @end |