Exemple #1
0
    public void FixedUpdate()
    {
        if (!init)
        {
            return;
        }

        if (!tempAudioSet)
        {
            tempAudioType = StreamSDK.instance.streamSDKAdvancedOptions.audioType;
            StreamSDK.instance.streamSDKAdvancedOptions.audioType = StreamSDKSpace.AudioType.microphone;
            tempAudioSet = true;
        }

        StreamSDK.UpdateStreamRemoteAudio(StreamSDK.GetAudio());
    }
    void SendAudio(int receiver)
    {
        byte[] audio = StreamSDK.GetAudio();
        if (audio != null)
        {
            switch (netTech)
            {
            case NetTech.photon:
                PhotonWrapper.instance.SendAudio(audio, receiver);
                break;

                /*
                 * case NetTech.tnet:
                 *      TNetWrapper.instance.SendAudio( audio, receiver );
                 *      break;
                 */
            }
        }
    }