Created
July 6, 2013 13:53
Revisions
-
centwave revised this gist
Jul 6, 2013 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,9 @@ @implementation MyClass - (void) viewDidLoad { [super viewDidLoad]; NSString *soundPath = [[NSBundle mainBundle] pathForResource:@"changeTrack" ofType:@"aif"]; AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath: soundPath], &mySound); } - (void) playMySoundLikeRightNowReally { -
centwave created this gist
Jul 6, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ @interface MyClass:NSObject { SystemSoundID mySound; } @implementation MyClass - (void) viewDidLoad { [super viewDidLoad]; AudioServicesCreateSystemSoundID(.... URL ...., &mySound); } - (void) playMySoundLikeRightNowReally { AudioServicesPlaySystemSound(mySound); } - (void) dealloc { AudioServicesDisposeSystemSoundID(mySound); [super dealloc]; } @end