How do I disable audio with a button and turn it back on?

Hello everyone,

I want to create a button that turns on and off audio, and have the image change at the same time. I have this button but when I click it the audio turns off and then right back on. I want it so that when I click it, it turns off. Then, when I click it the second time, it turns back on. And then for the third time, it goes back off, and so on. How would I do this? This is my script so far:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class DisableMusic : MonoBehaviour {



	public GameObject gameAudio;
	public Button button;
	public Sprite Image1;
	public Sprite AudioOff;
	public bool Onoroffaudio;

	public void AudioController()
	{
		


		if (Onoroffaudio == true) {
			button.GetComponent<Image> ().sprite = AudioOff;
			gameAudio.SetActive (false);
			Onoroffaudio = false;
			Debug.Log ("Audio working");
		}
		if (Onoroffaudio == false) {
			button.GetComponent<Image>().sprite = Image1;
			gameAudio.SetActive (true);
			Onoroffaudio = true;
		}


	}


}

use toggle buttons and check:

if(toggle.isOn)
{
 button.GetComponent().sprite = Image1;
		 m_MyAudioSource.Play();
}
else
{
 button.GetComponent ().sprite = AudioOff;
                m_MyAudioSource.Stop();
}

for more information u can check