Ok this works
- (id)initWithCoder:(NSCoder*)coder
{
if ((self = [super initWithCoder:coder]))
{
// Load the sounds
NSURL *soundURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"Begin Drawing" ofType:@"wav"]];
AudioServicesCreateSystemSoundID((CFURLRef)soundURL, &_boomSoundIDs[0]);
soundURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"Middle Drawing" ofType:@"wav"]];
AudioServicesCreateSystemSoundID((CFURLRef)soundURL, &_boomSoundIDs[1]);
soundURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"End Drawing" ofType:@"wav"]];
AudioServicesCreateSystemSoundID((CFURLRef)soundURL, &_boomSoundIDs[2]);
}
return self;
}
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [touches anyObject];
if ([touches count] == 1)
{
AudioServicesPlaySystemSound(_boomSoundIDs[0]);
}
But this is what I am trying to fix
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
if ([touches count] == 1)
{
AudioServicesPlaySystemSound(_boomSoundIDs[1]);
}
It just plays so continuously that the sound will not play all the way through, but begin every time the user moves their finger, I want is to actually play all the way through then loop again