Skip to content

Commit

Permalink
Fix sound playback
Browse files Browse the repository at this point in the history
  • Loading branch information
rbruels committed Dec 22, 2010
1 parent f2b3255 commit 8db7503
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Classes/ViewControllers/SettingsViewController.m
Expand Up @@ -130,7 +130,7 @@ -(void)createModel
[CheckGroupTableItem itemWithText:@"Pure Evil" on:[currentSound isEqual:redditSoundPureEvil] URL:redditSoundPureEvil group:shakingSoundKey],
[CheckGroupTableItem itemWithText:@"Roll Out" on:[currentSound isEqual:redditSoundRollout] URL:redditSoundRollout group:shakingSoundKey],
[CheckGroupTableItem itemWithText:@"Alien Hunter" on:[currentSound isEqual:redditSoundAlienHunter] URL:redditSoundAlienHunter group:shakingSoundKey],
[CheckGroupTableItem itemWithText:@"Scream" on:[currentSound isEqual:redditSoundScream] URL:redditSoundScream group:shakingSoundKey],
[CheckGroupTableItem itemWithText:@"Wilhelm" on:[currentSound isEqual:redditSoundScream] URL:redditSoundScream group:shakingSoundKey],

nil];
}
Expand Down Expand Up @@ -205,7 +205,7 @@ - (void)didSelectObject:(TTTableLinkedItem*)object atIndexPath:(NSIndexPath*)ind
{
SystemSoundID sound;
NSString *path = [[NSBundle mainBundle] pathForResource:object.URL ofType:@"pcm"];
AudioServicesCreateSystemSoundID((CFURLRef)[NSURL URLWithString:path], &sound);
AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:path], &sound);
AudioServicesAddSystemSoundCompletion (sound,NULL,NULL,settingsSoundPlayedCallback,(void*) self);
AudioServicesPlaySystemSound(sound);
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/iRedditAppDelegate.m
Expand Up @@ -184,7 +184,7 @@ - (void)reloadSound
AudioServicesDisposeSystemSoundID(shakingSound);

NSString *path = [[NSBundle mainBundle] pathForResource:[[NSUserDefaults standardUserDefaults] stringForKey:shakingSoundKey] ofType:@"pcm"];
AudioServicesCreateSystemSoundID((CFURLRef)[NSURL URLWithString:path], &shakingSound);
AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:path], &shakingSound);
}

- (void)dealloc
Expand Down

0 comments on commit 8db7503

Please sign in to comment.