iphone AVAudioPlayer plays sound effect twice
===

in my application I have swipe detection (left/right) method.
in that method I have an swipe counter.when counter reaches 17 I want to AVAudioPlayer
play an sound effect(game_over.mp3) once.after playing sound effect I want to change the UIview.
I have implemented above functions and works fine but when the UIview changes,AVAudioplayer
playes sound effect(game_over.mp3) twice.

code:

    -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
        [super touchesMoved:touches withEvent:event];
        
        UITouch *touch = [touches anyObject];
        //CGPoint curPt = [touch locationInView:self.view];    
        CGPoint newLocation = [touch locationInView:self.view];
        CGPoint oldLocation = [touch previousLocationInView:self.view];
        gameView.multipleTouchEnabled = true;
        
        if(newLocation.x-oldLocation.x>0){
            //NSLog(@"left");
            swipe_direction = 1;
            //count swipe
            touchCount +=1;
            if(touchCount==17){
               //call AVAudioplayer method
               [self playSoundEffect:@"game-over.mp3"];
               [gameView removeFromSuperview];
               [self.view addSubview:scoreView];
            }    
    
        }
        else{
            //NSLog(@"right");
            swipe_direction = 2;
            //count swipe
            touchCount +=1;
            if(touchCount==17){
               //call AVAudioplayer method
               [self playSoundEffect:@"game-over.mp3"];
               [gameView removeFromSuperview];
               [self.view addSubview:scoreView];
            }
        }

     
I want to play the sound effect only once after counter reachs 17.
please help me to solve this problem.
 
thank you