set different volumes inside app

Posted by blacksheep on Stack Overflow See other posts from Stack Overflow or by blacksheep
Published on 2010-05-31T08:15:27Z Indexed on 2010/05/31 8:22 UTC
Read the original article Hit count: 255

Filed under:
|

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

© Stack Overflow or respective owner

Related posts about iphone

Related posts about volume