IEnumerator DoTransitionMusic(AUDIOS audioToTransit, float durationOut, float durationIn)
    {
        AudioClip audioClip;

        if (!audioMap.ContainsKey(audioToTransit))
        {
            Debug.LogWarning(transform.gameObject.name + ": " + "Tried to play undefined sound: " + audioToTransit.ToString());
            yield break;
        }

        channels[(int)AUDIOPLAYER.MUSIC].DOFade(0.0f, durationOut).OnComplete(() =>
        {
            channels[(int)AUDIOPLAYER.MUSIC].Stop();
            if (audioMap.TryGetValue(audioToTransit, out audioClip))
            {
                channels[(int)AUDIOPLAYER.MUSIC].clip = audioClip;
                channels[(int)AUDIOPLAYER.MUSIC].Play();
                channels[(int)AUDIOPLAYER.MUSIC].DOFade(1.0f, durationIn).SetEase(Ease.InQuad);
            }
        }).SetEase(Ease.OutQuad);
        yield return(null);
    }
    /// <summary>
    /// Plays UI SFX from UI SFX channel.
    /// </summary>
    /// <param name="audio"></param>
    /// <param name="vol"></param>
    /// <param name="pitch"></param>
    public void PlayUISFX(AUDIOS audio, AUDIOPLAYER channel, float vol = 1f, float pitch = 1f)
    {
        AudioClip audioClip;

        if (!audioMap.ContainsKey(audio))
        {
            Debug.LogWarning(transform.gameObject.name + ": " + "Tried to play undefined sound: " + audio.ToString());
            return;
        }

        channels[(int)channel].pitch  = pitch;
        channels[(int)channel].volume = vol;

        if (audioMap.TryGetValue(audio, out audioClip))
        {
            // channels[(int)AUDIOPLAYER.SFX].clip = audioClip;
            channels[(int)channel].PlayOneShot(audioClip);
            // channels[(int)AUDIOPLAYER.SFX].Play();
            //if (channels[(int)AUDIOPLAYER.SFX].isPlaying)
            //    Debug.Log("Playing: " + channels[(int)AUDIOPLAYER.SFX].clip.name);
        }
    }
    /// <summary>
    /// Plays music from music channel
    /// </summary>
    /// <param name="audio"></param>
    /// <param name="loop"></param>
    /// <param name="doFade"></param>
    /// <param name="vol"></param>
    /// <param name="pitch"></param>
    public void PlayMusic(AUDIOS audio, bool doFade, float fadeDuration = 3.0f, bool loop = true, float vol = 1.0f, float pitch = 1f)
    {
        AudioClip audioClip;

        if (!audioMap.ContainsKey(audio))
        {
            Debug.LogWarning(transform.gameObject.name + ": " + "Tried to play undefined sound: " + audio.ToString());
            return;
        }

        channels[(int)AUDIOPLAYER.MUSIC].pitch  = pitch;
        channels[(int)AUDIOPLAYER.MUSIC].volume = vol;
        channels[(int)AUDIOPLAYER.MUSIC].loop   = loop;

        if (audioMap.TryGetValue(audio, out audioClip))
        {
            channels[(int)AUDIOPLAYER.MUSIC].clip = audioClip;
            channels[(int)AUDIOPLAYER.MUSIC].Play();

            if (doFade)
            {
                channels[(int)AUDIOPLAYER.MUSIC].volume = 0f;
                channels[(int)AUDIOPLAYER.MUSIC].DOFade(1.0f, fadeDuration);
            }

            if (channels[(int)AUDIOPLAYER.MUSIC].isPlaying)
            {
                Debug.Log("Playing: " + channels[(int)AUDIOPLAYER.MUSIC].clip.name);
            }
        }
    }