set different volumes inside app
- by blacksheep
i'd lioke to set the volume inside the touchesBegan action on half the volume of the IBAction.
(void) awakeFromNib {
[super awakeFromNib];
engine = [[Finch alloc] init];
E = [[RevolverSound alloc] initWithFile:PATH(@"E.wav")rounds:9];
}
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
CGPoint location = [touch locationInView:self.view];
if(CGRectContainsPoint(Edrop.frame,location)){
[E play];
}
}
(IBAction)bass:(id)sender {
if(CGRectIntersectsRect(finga.frame,e.frame)){
if(finga.center.y <= e.center.y)
[E play];
}
}
thanx, blacksheep