How can i use void ContactListener::PreSolve(b2Contact* contact, const b2Manifold* oldManifold) method in our application?
===

I dont know how to use this metnod in my application 

    void MyContactListener::PreSolve(b2Contact* contact, const b2Manifold* oldManifold) {
        
        b2WorldManifold worldManifold;
        
    	contact->GetWorldManifold(&worldManifold);
        
    	b2PointState state1[2], state2[2];
        
    	b2GetPointStates(state1, state2, oldManifold, contact->GetManifold());
    	//NSLog(@"Presolving");
        
    	if (state2[0] == b2_addState)
            
    	{
            
    		const b2Body* bodyA = contact->GetFixtureA()->GetBody();
            
    		const b2Body* bodyB = contact->GetFixtureB()->GetBody();
            
    		b2Vec2 point = worldManifold.points[0];
            
    		b2Vec2 vA = bodyA->GetLinearVelocityFromWorldPoint(point);
            
    		b2Vec2 vB = bodyB->GetLinearVelocityFromWorldPoint(point);
            
    		b2Vec2 rV = vB - vA;
            
    		float32 approachVelocity = b2Dot(rV, worldManifold.normal);
            
    		if (-1.5f < approachVelocity && approachVelocity < 0.0f)
                
    		{
                
    			//MyPlayCollisionSound();
    			NSLog(@"Not Playing Sound");
                
    		}
    		else 
            {
    			NSLog(@"playing the sound");
    					
            }
            
    	}
    
    }

How can i use this code in my HelloworldLayer.mm Please help me...
I have a problem here, I have a scene where some bodies falls and hit a static body, edges alike, I implemented the b2ContactListener, and in my tick method Im checking for contacts and play the sound, the problem with this approach is that when a body is constantly in contact with the static body, the sound plays indefinitely overlaying the previous one, so at the end I have huge noise..
What can I do to avoid this situation?


Please help me thanks......