Stop Audio Source Clip while button Press

if (Input.GetKeyDown(KeyCode.LeftAlt))
{

                m_WalkSpeed = 2f;
                m_AudioSource.clip = m_LandSound;
                m_AudioSource.Stop();
                

            }
            if (Input.GetKeyUp(KeyCode.LeftAlt))
            {

                m_WalkSpeed = 5f;
                m_AudioSource.clip = m_LandSound;
                m_AudioSource.Play();

            }

I want to stop Land Sound while Left Alt button pressing. But it won’t work. I am using Standart Assets of FPS Controller by Unity3D. How should I do that?

@canyuva Try this and let me know if it works for you.

at the top of your script under the class type the following

private bool isPlaying = false;

Then further down type the following

void LateUpdate ()
		{
			if (Input.GetKey (KeyCode.M)) 
			{
				isPlaying = !isPlaying;

					if (isPlaying) 
						m_AudioSource.Stop();

					else 
						m_AudioSource.Play();
			}
		}

This should in theory work correctly. ^~^