Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        if (m_voiceengine != null)
        {
            m_voiceengine.Poll();
            if (s_MicLevelEnabel)
            {
                s_logstr += "\r\n miclevel:" + m_voiceengine.GetMicLevel();
            }
        }

        m_logtext.text = s_logstr;
    }
Exemplo n.º 2
0
    private void OnMicToggleClick(bool ison)
    {
        if (ison)
        {
            txt.text += "打开麦克风";
            int ret = m_voiceengine.OpenMic();
            txt.text += "打开了麦克风" + ret;
            ret       = m_voiceengine.GetMicLevel();

            txt.text += "麦克风声音" + ret;
        }
        else
        {
            txt.text = "关闭麦克风";
            int ret = m_voiceengine.CloseMic();
            txt.text = "关闭了麦克风" + ret;
        }
    }