Exemplo n.º 1
0
 private void OnAudioConfigChanged(bool deviceWasChanged)
 {
     if (this.Logger.IsInfoEnabled)
     {
         this.Logger.LogInfo("OnAudioConfigChanged deviceWasChange={0}", deviceWasChanged);
     }
     if (deviceWasChanged && this.IsRecording)
     {
         this.RequiresRestart = true;
         PhotonMicrophoneEnumerator.Refresh();
         this.RestartRecording();
     }
 }
Exemplo n.º 2
0
 private void HandleDeviceChange()
 {
     PhotonMicrophoneEnumerator.Refresh();
     if (this.IsRecording && this.SourceType == InputSourceType.Microphone)
     {
         if (this.MicrophoneType == MicType.Photon)
         {
             this.RequiresRestart = !PhotonMicrophoneEnumerator.IDIsValid(this.photonMicrophoneDeviceId);
         }
         else
         {
             this.RequiresRestart = !IsValidUnityMic(this.unityMicrophoneDevice);
         }
         if (this.RequiresRestart)
         {
             if (this.Logger.IsInfoEnabled)
             {
                 this.Logger.LogInfo("Restarting Recording as the selected Photon microphone is no longer valid/available");
             }
             this.RestartRecording();
         }
     }
 }