public static int SetMute(IntPtr l)
    {
        int result;

        try
        {
            AudioManager4Unity audioManager4Unity = (AudioManager4Unity)LuaObject.checkSelf(l);
            bool muteBackGroundMusic;
            LuaObject.checkType(l, 2, out muteBackGroundMusic);
            bool muteSound;
            LuaObject.checkType(l, 3, out muteSound);
            bool muteMovieBackGroundMusic;
            LuaObject.checkType(l, 4, out muteMovieBackGroundMusic);
            bool mutePlayerVoice;
            LuaObject.checkType(l, 5, out mutePlayerVoice);
            bool muteSpeech;
            LuaObject.checkType(l, 6, out muteSpeech);
            audioManager4Unity.SetMute(muteBackGroundMusic, muteSound, muteMovieBackGroundMusic, mutePlayerVoice, muteSpeech);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int PlaySound(IntPtr l)
    {
        int result;

        try
        {
            int num = LuaDLL.lua_gettop(l);
            if (LuaObject.matchType(l, num, 2, typeof(AudioClip), typeof(float)))
            {
                AudioManager4Unity audioManager4Unity = (AudioManager4Unity)LuaObject.checkSelf(l);
                AudioClip          sound;
                LuaObject.checkType <AudioClip>(l, 2, out sound);
                float volume;
                LuaObject.checkType(l, 3, out volume);
                audioManager4Unity.PlaySound(sound, volume);
                LuaObject.pushValue(l, true);
                result = 1;
            }
            else if (LuaObject.matchType(l, num, 2, typeof(string), typeof(float)))
            {
                AudioManager4Unity audioManager4Unity2 = (AudioManager4Unity)LuaObject.checkSelf(l);
                string             sound2;
                LuaObject.checkType(l, 2, out sound2);
                float volume2;
                LuaObject.checkType(l, 3, out volume2);
                IAudioPlayback o = audioManager4Unity2.PlaySound(sound2, volume2);
                LuaObject.pushValue(l, true);
                LuaObject.pushValue(l, o);
                result = 2;
            }
            else if (num == 5)
            {
                AudioManager4Unity audioManager4Unity3 = (AudioManager4Unity)LuaObject.checkSelf(l);
                string             sound3;
                LuaObject.checkType(l, 2, out sound3);
                AudioClip audioClip;
                LuaObject.checkType <AudioClip>(l, 3, out audioClip);
                float volume3;
                LuaObject.checkType(l, 4, out volume3);
                bool allowRepeatedPlaying;
                LuaObject.checkType(l, 5, out allowRepeatedPlaying);
                audioManager4Unity3.PlaySound(sound3, audioClip, volume3, allowRepeatedPlaying);
                LuaObject.pushValue(l, true);
                result = 1;
            }
            else
            {
                LuaObject.pushValue(l, false);
                LuaDLL.lua_pushstring(l, "No matched override function PlaySound to call");
                result = 2;
            }
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int SetVolume(IntPtr l)
    {
        int result;

        try
        {
            int num = LuaDLL.lua_gettop(l);
            if (num == 4)
            {
                AudioManager4Unity audioManager4Unity = (AudioManager4Unity)LuaObject.checkSelf(l);
                string             category;
                LuaObject.checkType(l, 2, out category);
                float volume;
                LuaObject.checkType(l, 3, out volume);
                bool isSmooth;
                LuaObject.checkType(l, 4, out isSmooth);
                audioManager4Unity.SetVolume(category, volume, isSmooth);
                LuaObject.pushValue(l, true);
                result = 1;
            }
            else if (num == 5)
            {
                AudioManager4Unity audioManager4Unity2 = (AudioManager4Unity)LuaObject.checkSelf(l);
                float backGroundMusicVolume;
                LuaObject.checkType(l, 2, out backGroundMusicVolume);
                float soundVolume;
                LuaObject.checkType(l, 3, out soundVolume);
                float playerVoiceVolume;
                LuaObject.checkType(l, 4, out playerVoiceVolume);
                float speechVolume;
                LuaObject.checkType(l, 5, out speechVolume);
                audioManager4Unity2.SetVolume(backGroundMusicVolume, soundVolume, playerVoiceVolume, speechVolume);
                LuaObject.pushValue(l, true);
                result = 1;
            }
            else
            {
                LuaObject.pushValue(l, false);
                LuaDLL.lua_pushstring(l, "No matched override function SetVolume to call");
                result = 2;
            }
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int StopAll(IntPtr l)
    {
        int result;

        try
        {
            AudioManager4Unity audioManager4Unity = (AudioManager4Unity)LuaObject.checkSelf(l);
            audioManager4Unity.StopAll();
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int IsPlayerVoicePlaying(IntPtr l)
    {
        int result;

        try
        {
            AudioManager4Unity audioManager4Unity = (AudioManager4Unity)LuaObject.checkSelf(l);
            bool b = audioManager4Unity.IsPlayerVoicePlaying();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, b);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int EnableDefaultAudioListener(IntPtr l)
    {
        int result;

        try
        {
            AudioManager4Unity audioManager4Unity = (AudioManager4Unity)LuaObject.checkSelf(l);
            bool enable;
            LuaObject.checkType(l, 2, out enable);
            audioManager4Unity.EnableDefaultAudioListener(enable);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int PlayBackGroundMusic(IntPtr l)
    {
        int result;

        try
        {
            AudioManager4Unity audioManager4Unity = (AudioManager4Unity)LuaObject.checkSelf(l);
            string             music;
            LuaObject.checkType(l, 2, out music);
            audioManager4Unity.PlayBackGroundMusic(music);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int Pause(IntPtr l)
    {
        int result;

        try
        {
            AudioManager4Unity audioManager4Unity = (AudioManager4Unity)LuaObject.checkSelf(l);
            bool pause;
            LuaObject.checkType(l, 2, out pause);
            audioManager4Unity.Pause(pause);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int SetBackGroundMusicMute(IntPtr l)
    {
        int result;

        try
        {
            AudioManager4Unity audioManager4Unity = (AudioManager4Unity)LuaObject.checkSelf(l);
            bool backGroundMusicMute;
            LuaObject.checkType(l, 2, out backGroundMusicMute);
            audioManager4Unity.SetBackGroundMusicMute(backGroundMusicMute);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int PlaySpeech(IntPtr l)
    {
        int result;

        try
        {
            int total = LuaDLL.lua_gettop(l);
            if (LuaObject.matchType(l, total, 2, typeof(string), typeof(float)))
            {
                AudioManager4Unity audioManager4Unity = (AudioManager4Unity)LuaObject.checkSelf(l);
                string             sound;
                LuaObject.checkType(l, 2, out sound);
                float volume;
                LuaObject.checkType(l, 3, out volume);
                audioManager4Unity.PlaySpeech(sound, volume);
                LuaObject.pushValue(l, true);
                result = 1;
            }
            else if (LuaObject.matchType(l, total, 2, typeof(AudioClip), typeof(float)))
            {
                AudioManager4Unity audioManager4Unity2 = (AudioManager4Unity)LuaObject.checkSelf(l);
                AudioClip          sound2;
                LuaObject.checkType <AudioClip>(l, 2, out sound2);
                float volume2;
                LuaObject.checkType(l, 3, out volume2);
                audioManager4Unity2.PlaySpeech(sound2, volume2);
                LuaObject.pushValue(l, true);
                result = 1;
            }
            else
            {
                LuaObject.pushValue(l, false);
                LuaDLL.lua_pushstring(l, "No matched override function PlaySpeech to call");
                result = 2;
            }
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int GetVolume(IntPtr l)
    {
        int result;

        try
        {
            AudioManager4Unity audioManager4Unity = (AudioManager4Unity)LuaObject.checkSelf(l);
            string             category;
            LuaObject.checkType(l, 2, out category);
            float volume = audioManager4Unity.GetVolume(category);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, volume);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int PlayPlayerVoice(IntPtr l)
    {
        int result;

        try
        {
            AudioManager4Unity audioManager4Unity = (AudioManager4Unity)LuaObject.checkSelf(l);
            AudioClip          sound;
            LuaObject.checkType <AudioClip>(l, 2, out sound);
            float volume;
            LuaObject.checkType(l, 3, out volume);
            audioManager4Unity.PlayPlayerVoice(sound, volume);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int StopSound(IntPtr l)
    {
        int result;

        try
        {
            int num = LuaDLL.lua_gettop(l);
            if (num == 2)
            {
                AudioManager4Unity audioManager4Unity = (AudioManager4Unity)LuaObject.checkSelf(l);
                string             sound;
                LuaObject.checkType(l, 2, out sound);
                audioManager4Unity.StopSound(sound);
                LuaObject.pushValue(l, true);
                result = 1;
            }
            else if (num == 1)
            {
                AudioManager4Unity audioManager4Unity2 = (AudioManager4Unity)LuaObject.checkSelf(l);
                audioManager4Unity2.StopSound();
                LuaObject.pushValue(l, true);
                result = 1;
            }
            else
            {
                LuaObject.pushValue(l, false);
                LuaDLL.lua_pushstring(l, "No matched override function StopSound to call");
                result = 2;
            }
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }