Cant hear others after changing Microphone(AudioClip.SetData failed)

Voice 2.31

Pun 2.40

Unity 2020.3.7f1

While in a photon room I change the microphone using Recorder.UnityMicrophoneDevice and after that I call Recorder.RestartRecording(). After a few seconds the microphone is set to the desried one, but I cannot hear others speaking, they can hear me and I can hear amibent sound.

I also receive this log continously

AudioClip.SetData failed; AudioClip UnityAudioOut contains no data

UnityEngine.AudioClip:SetData(Single[], Int32)

Photon.Voice.AudioOutDelayControl`1:Service()

Photon.Voice.Unity.VoiceConnection:Update()

Is this the correct way to reset the mic or is this another issue?

Comments

  • Why do you call Recorder.RestartRecording()? Changing UnityMicrophoneDevice should restart recording automatically.

    Can I look at the full log with maximum logging level?

  • Here is a log from when the mic changes till it hits the repeating log


    08-16 23:23:18.610 17508 17539 I Unity  : [Head.Recorder] 2022-08-17T03:23:18:Recorder.UnityMicrophoneDevice changed, Recorder requires restart for this to take effect.

    08-16 23:23:18.610 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:set_UnityMicrophoneDevice(String)

    08-16 23:23:18.610 17508 17539 I Unity  : GGChassis.GGAvatars.HeadComponent:TryToConfigureAndRestartRecorderInUse()

    08-16 23:23:18.610 17508 17539 I Unity  : UnityEngine.AudioConfigurationChangeHandler:Invoke(Boolean)

    08-16 23:23:18.610 17508 17539 I Unity  : 

    08-16 23:23:18.613 19108 19293 I ...ntity.auth.device.dr: Get DataStorage instance for initialization

    08-16 23:23:18.613 19108 19293 I ...ntity.auth.device.dr: Initialize DataStorage instance

    08-16 23:23:18.613 19108 19293 I ...ntity.auth.device.dr: Setup DataStorage instance

    08-16 23:23:18.615 17508 17539 I Unity  : [Head.Recorder] 2022-08-17T03:23:18:Unsubscribed from audio configuration changes via Unity callback.

    08-16 23:23:18.615 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:UnsubscribeFromSystemChanges()

    08-16 23:23:18.615 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:RemoveVoice()

    08-16 23:23:18.615 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:StopRecordingInternal()

    08-16 23:23:18.615 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:StopRecording()

    08-16 23:23:18.615 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:RestartRecording(Boolean)

    08-16 23:23:18.615 17508 17539 I Unity  : UnityEngine.AudioConfigurationChangeHandler:Invoke(Boolean)

    08-16 23:23:18.615 17508 17539 I Unity  : 

    08-16 23:23:18.628 17508 17539 I Unity  : [PhotonVoiceNetwork singleton.PhotonVoiceNetwork] 2022-08-17T03:23:18:[PV] Local AudioOpus v#1 ch#0 remove sent

    08-16 23:23:18.628 17508 17539 I Unity  : Photon.Voice.PhotonTransportProtocol:buildVoiceRemoveMessage(LocalVoice)

    08-16 23:23:18.628 17508 17539 I Unity  : Photon.Voice.LoadBalancingTransport:SendVoiceRemove(LocalVoice, Int32, Int32)

    08-16 23:23:18.628 17508 17539 I Unity  : Photon.Voice.VoiceClient:RemoveLocalVoice(LocalVoice)

    08-16 23:23:18.628 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:RemoveVoice()

    08-16 23:23:18.628 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:StopRecordingInternal()

    08-16 23:23:18.628 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:StopRecording()

    08-16 23:23:18.628 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:RestartRecording(Boolean)

    08-16 23:23:18.628 17508 17539 I Unity  : UnityEngine.AudioConfigurationChangeHandler:Invoke(Boolean)

    08-16 23:23:18.628 17508 17539 I Unity  : 

    08-16 23:23:18.634 17508 17539 I Unity  : [PhotonVoiceNetwork singleton.PhotonVoiceNetwork] 2022-08-17T03:23:18:[PV] Local AudioOpus v#1 ch#0 removed

    08-16 23:23:18.634 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:RemoveVoice()

    08-16 23:23:18.634 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:StopRecordingInternal()

    08-16 23:23:18.634 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:StopRecording()

    08-16 23:23:18.634 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:RestartRecording(Boolean)

    08-16 23:23:18.634 17508 17539 I Unity  : UnityEngine.AudioConfigurationChangeHandler:Invoke(Boolean)

    08-16 23:23:18.634 17508 17539 I Unity  : 

    08-16 23:23:18.634  871 1290 D audio_hw_primary: disable_audio_route: usecase(0) reset and update mixer path: deep-buffer-playback speaker

    08-16 23:23:18.635  871 1290 I soundtrigger: audio_extn_sound_trigger_update_stream_status: send event 2: usecase id 0, type 0

    08-16 23:23:18.635  871 1290 D sound_trigger_platform: platform_stdev_check_and_update_concurrency: concurrency active 0, tx 0, rx 0, concurrency session_allowed 1

    08-16 23:23:18.635  871 1290 D sound_trigger_platform: platform_stdev_check_concurrency_supported: capture concurrency allowed, usecase type 0 voice_concur 0 voip_concur 0

    08-16 23:23:18.635 17508 18482 I Unity  : [PhotonVoiceNetwork singleton.PhotonVoiceNetwork] 2022-08-17T03:23:18:[PV] Local AudioOpus v#1 ch#0: Exiting data encode thread

    08-16 23:23:18.635 17508 18482 I Unity  : Photon.Voice.LocalVoiceFramed`1:PushDataAsyncThread()

    08-16 23:23:18.635 17508 18482 I Unity  : System.Threading.ThreadStart:Invoke()

    08-16 23:23:18.635 17508 18482 I Unity  : System.Threading.ContextCallback:Invoke(Object)

    08-16 23:23:18.635 17508 18482 I Unity  : System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)

    08-16 23:23:18.635 17508 18482 I Unity  : System.Threading.ThreadStart:Invoke()

    08-16 23:23:18.635 17508 18482 I Unity  : 

    08-16 23:23:18.636 1334 1690 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4

    08-16 23:23:18.642 19108 19234 I ...ntity.auth.device.aa: Returning Default multiple profile settings

    08-16 23:23:18.643 17508 17539 I Unity  : [Head.Recorder] 2022-08-17T03:23:18:Setting recorder's source to Unity microphone device Android voice recognition input

    08-16 23:23:18.643 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:CreateLocalVoiceAudioAndSource()

    08-16 23:23:18.643 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:Setup()

    08-16 23:23:18.643 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:RestartRecording(Boolean)

    08-16 23:23:18.643 17508 17539 I Unity  : UnityEngine.AudioConfigurationChangeHandler:Invoke(Boolean)

    08-16 23:23:18.643 17508 17539 I Unity  : 

    08-16 23:23:18.645 17508 17539 I Unity  : [Head.Recorder] 2022-08-17T03:23:18:[PV] MicWrapper: initializing microphone 'Android voice recognition input', suggested frequency = 24000).

    08-16 23:23:18.645 17508 17539 I Unity  : Photon.Voice.Unity.MicWrapper:.ctor(String, Int32, ILogger)

    08-16 23:23:18.645 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:CreateLocalVoiceAudioAndSource()

    08-16 23:23:18.645 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:Setup()

    08-16 23:23:18.645 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:RestartRecording(Boolean)

    08-16 23:23:18.645 17508 17539 I Unity  : UnityEngine.AudioConfigurationChangeHandler:Invoke(Boolean)

    08-16 23:23:18.645 17508 17539 I Unity  : 

    08-16 23:23:18.646 17508 17539 W Unity  : [Head.Recorder] 2022-08-17T03:23:18:[PV] MicWrapper does not support suggested frequency 24000 (min: 16000, max: 16000). Setting to 16000

    08-16 23:23:18.646 17508 17539 W Unity  : Photon.Voice.Unity.MicWrapper:.ctor(String, Int32, ILogger)

    08-16 23:23:18.646 17508 17539 W Unity  : Photon.Voice.Unity.Recorder:CreateLocalVoiceAudioAndSource()

    08-16 23:23:18.646 17508 17539 W Unity  : Photon.Voice.Unity.Recorder:Setup()

    08-16 23:23:18.646 17508 17539 W Unity  : Photon.Voice.Unity.Recorder:RestartRecording(Boolean)

    08-16 23:23:18.646 17508 17539 W Unity  : UnityEngine.AudioConfigurationChangeHandler:Invoke(Boolean)

    08-16 23:23:18.646 17508 17539 W Unity  : 

    08-16 23:23:18.647 17508 17539 W libOpenSLES: Conversion from OpenSL ES positional channel mask 0x4 to Android mask 0 loses channels

    08-16 23:23:18.647 17508 17539 I libOpenSLES: Emulating old channel mask behavior (ignoring positional mask 0x4, using default mask 0x10 based on channel count of 1)

    08-16 23:23:18.658 19108 19293 W CursorWindow: Window is full: requested allocation 2036 bytes, free space 1578 bytes, window size 2097152 bytes

    08-16 23:23:18.662  985 19297 I AudioFlinger: AudioFlinger's thread 0x7243ca6040 tid=19297 ready to run

    08-16 23:23:18.663  985 4395 W AudioFlinger: createRecordTrack_l(): mismatch between requested flags (00000005) and input flags (00000001)

    08-16 23:23:18.663 1334 1690 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4

    08-16 23:23:18.664 1334 1690 I chatty : uid=1000(system) Binder:1334_5 identical 1 line

    08-16 23:23:18.664 1334 1690 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4

    08-16 23:23:18.666 1334 1690 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4

    08-16 23:23:18.666 1334 1690 I chatty : uid=1000(system) Binder:1334_5 identical 1 line

    08-16 23:23:18.666 1334 1690 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4

    08-16 23:23:18.666 1334 3201 I SoundTriggerMiddlewareLogging: setCaptureState[this=com.android.server.soundtrigger_middleware.SoundTriggerMiddlewareImpl@78bac12, caller=1041/985](false)

    08-16 23:23:18.670  985 19299 I AudioFlinger: AudioFlinger's thread 0x7243ca6040 tid=19299 ready to run

    08-16 23:23:18.674 1334 3201 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4

    08-16 23:23:18.674 1334 3201 I chatty : uid=1000(system) Binder:1334_D identical 1 line

    08-16 23:23:18.674 1334 3201 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4

    08-16 23:23:18.677 1334 1690 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4

    08-16 23:23:18.677 1334 1690 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4

    08-16 23:23:18.679  837  858 E statsd : Predicate 5980654721335871649 dropping data for dimension key (10)0x2010101->10625[I] (10)0x30000->AudioIn[S] 

    08-16 23:23:18.681 1334 3201 I SoundTriggerMiddlewareLogging: setCaptureState[this=com.android.server.soundtrigger_middleware.SoundTriggerMiddlewareImpl@78bac12, caller=1041/985](true)

    08-16 23:23:18.683 17508 17539 I Unity  : [Head.Recorder] 2022-08-17T03:23:18:[PV] MicWrapper: microphone 'Android voice recognition input' initialized, frequency = 16000, channels = 1.

    08-16 23:23:18.683 17508 17539 I Unity  : Photon.Voice.Unity.MicWrapper:.ctor(String, Int32, ILogger)

    08-16 23:23:18.683 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:CreateLocalVoiceAudioAndSource()

    08-16 23:23:18.683 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:Setup()

    08-16 23:23:18.683 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:RestartRecording(Boolean)

    08-16 23:23:18.683 17508 17539 I Unity  : UnityEngine.AudioConfigurationChangeHandler:Invoke(Boolean)

    08-16 23:23:18.683 17508 17539 I Unity  : 

    08-16 23:23:18.683  871 14375 E FMQ   : grantorIdx must be less than 3

    08-16 23:23:18.684  871 14375 E FMQ   : grantorIdx must be less than 3

    08-16 23:23:18.686  985 19299 E FMQ   : grantorIdx must be less than 3

    08-16 23:23:18.686  985 19299 E FMQ   : grantorIdx must be less than 3

    08-16 23:23:18.687  871 19301 D audio_hw_primary: select_devices_with_force_switch: changing use case audio-record input device from(56: speaker-mic, acdb 11) to (84: voice-rec-mic, acdb 41)

    08-16 23:23:18.687  871 19301 I msm8974_platform: platform_check_capture_backend_cfg:txbecf: afe: Codec backend needs to be updated. new bit width: 0 new sample rate: 0 new channel: 1

    08-16 23:23:18.688  871 19301 D msm8974_platform: platform_set_backend_cfg:becf: afe: SLIM_0_TX Format mixer set to 0 bit for 1 format

    08-16 23:23:18.688  871 19301 D msm8974_platform: platform_set_backend_cfg:becf: afe: SLIM_0_TX SampleRate set to KHZ_48

    08-16 23:23:18.688  667  667 D android.hardware.power@1.3-service.pixel-libperfmgr: AUDIO_STREAMING: 1

    08-16 23:23:18.688  871 19301 D sound_trigger_platform: platform_stdev_check_and_update_concurrency: concurrency active 0, tx 1, rx 0, concurrency session_allowed 1

    08-16 23:23:18.688  871 19301 D audio_hw_primary: enable_snd_device: snd_device(84: voice-rec-mic)

    08-16 23:23:18.688  871 19301 D audio_route: Apply path: voice-rec-mic

    08-16 23:23:18.689 17508 17539 I Unity  : [PhotonVoiceNetwork singleton.PhotonVoiceNetwork] 2022-08-17T03:23:18:[PV] OpusCodec.Encoder created. Opus version libopus unknown. Bitrate 45000. EncoderDelay Delay20ms

    08-16 23:23:18.689 17508 17539 I Unity  : Photon.Voice.Encoder`1:.ctor(VoiceInfo, ILogger)

    08-16 23:23:18.689 17508 17539 I Unity  : Photon.Voice.EncoderFloat:.ctor(VoiceInfo, ILogger)

    08-16 23:23:18.689 17508 17539 I Unity  : Photon.Voice.Factory:CreateEncoder(VoiceInfo, ILogger)

    08-16 23:23:18.689 17508 17539 I Unity  : Photon.Voice.Platform:CreateDefaultAudioEncoder(ILogger, VoiceInfo)

    08-16 23:23:18.689 17508 17539 I Unity  : Photon.Voice.VoiceClient:CreateLocalVoiceAudioFromSource(VoiceInfo, IAudioDesc, AudioSampleType, IEncoder, Int32)

    08-16 23:23:18.689 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:CreateLocalVoiceAudioAndSource()

    08-16 23:23:18.689 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:Setup()

    08-16 23:23:18.689 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:RestartRecording(Boolean)

    08-16 23:23:18.689 17508 17539 I Unity  : UnityEngine.AudioConfigurationChangeHandler:Invoke(Boolean)

    08-16 23:23:18.689 17508 17539 I Unity  : 

    08-16 23:23:18.692  985 1292 D AudioFlinger: ro.audio.silent is ignored since no output device is set

    08-16 23:23:18.692  985 1313 D AudioFlinger: ro.audio.silent is ignored since no output device is set

    08-16 23:23:18.692  985 1307 D AudioFlinger: ro.audio.silent is ignored since no output device is set

    08-16 23:23:18.693  985 1302 D AudioFlinger: ro.audio.silent is ignored since no output device is set

    08-16 23:23:18.693 17508 17539 W Unity  : [PhotonVoiceNetwork singleton.PhotonVoiceNetwork] 2022-08-17T03:23:18:[PV] Local voice #2 audio source frequency 16000 and encoder sampling rate 24000 do not match. Resampling will occur before encoding.

    08-16 23:23:18.693 17508 17539 W Unity  : Photon.Voice.LocalVoiceAudio`1:.ctor(VoiceClient, IEncoder, Byte, VoiceInfo, IAudioDesc, Int32)

    08-16 23:23:18.693 17508 17539 W Unity  : Photon.Voice.LocalVoiceAudioFloat:.ctor(VoiceClient, IEncoder, Byte, VoiceInfo, IAudioDesc, Int32)

    08-16 23:23:18.693 17508 17539 W Unity  : Photon.Voice.LocalVoiceAudio`1:Create(VoiceClient, Byte, IEncoder, VoiceInfo, IAudioDesc, Int32)

    08-16 23:23:18.693 17508 17539 W Unity  : Photon.Voice.<>c__DisplayClass51_0`1:<CreateLocalVoiceAudio>b__0(Byte, Int32)

    08-16 23:23:18.693 17508 17539 W Unity  : System.Func`3:Invoke(T1, T2)

    08-16 23:23:18.693 17508 17539 W Unity  : Photon.Voice.VoiceClient:createLocalVoice(Int32, Func`3)

    08-16 23:23:18.693 17508 17539 W Unity  : Photon.Voice.VoiceClient:CreateLocalVoiceAudio(VoiceInfo, IAudioDesc, IEncoder, Int32)

    08-16 23:23:18.693 17508 17539 W Unity  : Photon.Voice.VoiceClient:CreateLocalVoiceAudioFromSource(VoiceInfo, IAudioDesc, AudioSampleType, IEncoder, Int32)

    08-16 23:23:18.693 17508 17539 W Unity  : Photon.Voice.Unity.Recorder:CreateLocalVoiceAudioAndSource()

    08-16 23:23:18.693 17508 17539 W Unity  : Photon.Voice.Unity.Recorder:Setup()

    08-16 23:23:18.693 17508 17539 W Unity  : Photon.Voice.Unity.Recorder:RestartRecording(Boolean)

    08-16 23:23:18.693 17508 17539 W Unity  : UnityEngine

    08-16 23:23:18.693 1334 3201 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4

    08-16 23:23:18.693 1334 1690 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4

    08-16 23:23:18.694 1334 1690 I chatty : uid=1000(system) Binder:1334_5 identical 1 line

    08-16 23:23:18.694 1334 1690 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4

    08-16 23:23:18.695  871 19301 I soundtrigger: audio_extn_sound_trigger_update_stream_status: send event 13: usecase id 10, type 1

    08-16 23:23:18.695  871 19301 D sound_trigger_platform: platform_stdev_check_and_update_concurrency: concurrency active 0, tx 1, rx 0, concurrency session_allowed 1

    08-16 23:23:18.695  871 19301 D sound_trigger_platform: platform_stdev_check_concurrency_supported: capture concurrency allowed, usecase type 1 voice_concur 0 voip_concur 0

    08-16 23:23:18.695 1334 1690 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4

    08-16 23:23:18.695 1334 1690 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4

    08-16 23:23:18.695  871 19301 D ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 41, path = 1, app id = 0x11132, sample rate = 48000

    08-16 23:23:18.695  871 19301 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE, vol index 0

    08-16 23:23:18.695  871 19301 D android.hardware.audio.service: Failed to fetch the lookup information of the device 00000029 

    08-16 23:23:18.695  871 19301 E ACDB-LOADER: Error: ACDB AudProc vol returned = -19

    08-16 23:23:18.695  871 19301 D ACDB-LOADER: ACDB -> GET_AFE_TOPOLOGY_ID for adcd_id 41, Topology Id 112fb

    08-16 23:23:18.695  871 19301 D android.hardware.audio.service: Failed to fetch the lookup information of the device 00000029 

    08-16 23:23:18.695  871 19301 D ACDB-LOADER: Error: ACDB AFE returned = -19

    08-16 23:23:18.695  871 19301 D audio_hw_primary: enable_audio_route: usecase(10) apply and update mixer path: audio-record

    08-16 23:23:18.695  871 19301 D audio_route: Apply path: audio-record

    08-16 23:23:18.695 1334 1690 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4

    08-16 23:23:18.695 1334 1690 I chatty : uid=1000(system) Binder:1334_5 identical 2 lines

    08-16 23:23:18.696 1334 1690 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4

    08-16 23:23:18.698 17508 17539 I Unity  : [PhotonVoiceNetwork singleton.PhotonVoiceNetwork] 2022-08-17T03:23:18:[PV] Local AudioOpus v#2 ch#0 Sending info: c=AudioOpus f=24000 ch=1 d=20000 s=480 b=45000 w=0 h=0 fps=0 kfi=0 ud=1004 ev=0

    08-16 23:23:18.698 17508 17539 I Unity  : Photon.Voice.PhotonTransportProtocol:buildVoicesInfo(IEnumerable`1, Boolean)

    08-16 23:23:18.698 17508 17539 I Unity  : Photon.Voice.LoadBalancingTransport:SendVoicesInfo(IEnumerable`1, Int32, Int32)

    08-16 23:23:18.698 17508 17539 I Unity  : Photon.Voice.VoiceClient:sendVoicesInfoAndConfigFrame(IEnumerable`1, Int32, Int32)

    08-16 23:23:18.698 17508 17539 I Unity  : Photon.Voice.VoiceClient:addVoice(Byte, Int32, LocalVoice)

    08-16 23:23:18.698 17508 17539 I Unity  : Photon.Voice.VoiceClient:createLocalVoice(Int32, Func`3)

    08-16 23:23:18.698 17508 17539 I Unity  : Photon.Voice.VoiceClient:CreateLocalVoiceAudio(VoiceInfo, IAudioDesc, IEncoder, Int32)

    08-16 23:23:18.698 17508 17539 I Unity  : Photon.Voice.VoiceClient:CreateLocalVoiceAudioFromSource(VoiceInfo, IAudioDesc, AudioSampleType, IEncoder, Int32)

    08-16 23:23:18.698 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:CreateLocalVoiceAudioAndSource()

    08-16 23:23:18.698 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:Setup()

    08-16 23:23:18.698 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:RestartRecording(Boolean)

    08-16 23:23:18.698 17508 17539 I Unity  : UnityEngine.AudioConfigurationChangeHandler:Invoke(Boolean)

    08-16 23:23:18.698 17508 17539 I Unity  : 

    08-16 23:23:18.702 17508 17539 I Unity  : [PhotonVoiceNetwork singleton.PhotonVoiceNetwork] 2022-08-17T03:23:18:[PV] Local AudioOpus v#2 ch#0 added enc: c=AudioOpus f=24000 ch=1 d=20000 s=480 b=45000 w=0 h=0 fps=0 kfi=0 ud=1004

    08-16 23:23:18.702 17508 17539 I Unity  : Photon.Voice.VoiceClient:createLocalVoice(Int32, Func`3)

    08-16 23:23:18.702 17508 17539 I Unity  : Photon.Voice.VoiceClient:CreateLocalVoiceAudio(VoiceInfo, IAudioDesc, IEncoder, Int32)

    08-16 23:23:18.702 17508 17539 I Unity  : Photon.Voice.VoiceClient:CreateLocalVoiceAudioFromSource(VoiceInfo, IAudioDesc, AudioSampleType, IEncoder, Int32)

    08-16 23:23:18.702 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:CreateLocalVoiceAudioAndSource()

    08-16 23:23:18.702 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:Setup()

    08-16 23:23:18.702 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:RestartRecording(Boolean)

    08-16 23:23:18.702 17508 17539 I Unity  : UnityEngine.AudioConfigurationChangeHandler:Invoke(Boolean)

    08-16 23:23:18.702 17508 17539 I Unity  : 

    08-16 23:23:18.703 17508 17539 I Unity  : [Head.Recorder] 2022-08-17T03:23:18:Subscribed to audio configuration changes via Unity callback.

    08-16 23:23:18.703 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:Setup()

    08-16 23:23:18.703 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:RestartRecording(Boolean)

    08-16 23:23:18.703 17508 17539 I Unity  : UnityEngine.AudioConfigurationChangeHandler:Invoke(Boolean)

    08-16 23:23:18.703 17508 17539 I Unity  : 

    08-16 23:23:18.704 17508 17539 I Unity  : [Head.Recorder] 2022-08-17T03:23:18:OnAudioConfigChanged deviceWasChanged=False

    08-16 23:23:18.704 17508 17539 I Unity  : Photon.Voice.Unity.Recorder:OnAudioConfigChanged(Boolean)

    08-16 23:23:18.704 17508 17539 I Unity  : UnityEngine.AudioConfigurationChangeHandler:Invoke(Boolean)

    08-16 23:23:18.704 17508 17539 I Unity  : 

    08-16 23:23:18.717 17508 17539 I Unity  : AudioClip.SetData failed; AudioClip UnityAudioOut contains no data

    08-16 23:23:18.717 17508 17539 I Unity  : UnityEngine.AudioClip:SetData(Single[], Int32)

    08-16 23:23:18.717 17508 17539 I Unity  : Photon.Voice.AudioOutDelayControl`1:processFrame(T[], Int32)

    08-16 23:23:18.717 17508 17539 I Unity  : Photon.Voice.AudioOutDelayControl`1:Service()

    08-16 23:23:18.717 17508 17539 I Unity  : Photon.Voice.Unity.VoiceConnection:Update()

    08-16 23:23:18.717 17508 17539 I Unity  : 

    08-16 23:23:18.718 17508 17539 I Unity  : AudioClip.SetData failed; AudioClip UnityAudioOut contains no data

    08-16 23:23:18.718 17508 17539 I Unity  : UnityEngine.AudioClip:SetData(Single[], Int32)

    08-16 23:23:18.718 17508 17539 I Unity  : Photon.Voice.AudioOutDelayControl`1:processFrame(T[], Int32)

    08-16 23:23:18.718 17508 17539 I Unity  : Photon.Voice.AudioOutDelayControl`1:Service()

    08-16 23:23:18.718 17508 17539 I Unity  : Photon.Voice.Unity.VoiceConnection:Update()

    08-16 23:23:18.718 17508 17539 I Unity  : 

    08-16 23:23:18.718 17508 17539 I Unity  : AudioClip.SetData failed; AudioClip UnityAudioOut contains no data

    08-16 23:23:18.718 17508 17539 I Unity  : UnityEngine.AudioClip:SetData(Single[], Int32)

    08-16 23:23:18.718 17508 17539 I Unity  : Photon.Voice.AudioOutDelayControl`1:processFrame(T[], Int32)

    08-16 23:23:18.718 17508 17539 I Unity  : Photon.Voice.AudioOutDelayControl`1:Service()

    08-16 23:23:18.718 17508 17539 I Unity  : Photon.Voice.Unity.VoiceConnection:Update()

    08-16 23:23:18.718 17508 17539 I Unity  : 

    08-16 23:23:18.721 17508 17539 I chatty : uid=10625(com.AdeptReality.EdstutiaDev) UnityMain identical 7 lines

    08-16 23:23:18.722 17508 17539 I Unity  : AudioClip.SetData failed; AudioClip UnityAudioOut contains no data

    08-16 23:23:18.722 17508 17539 I Unity  : UnityEngine.AudioClip:SetData(Single[], Int32)

    08-16 23:23:18.722 17508 17539 I Unity  : Photon.Voice.AudioOutDelayControl`1:processFrame(T[], Int32)

    08-16 23:23:18.722 17508 17539 I Unity  : Photon.Voice.AudioOutDelayControl`1:Service()

    08-16 23:23:18.722 17508 17539 I Unity  : Photon.Voice.Unity.VoiceConnection:Update()

    08-16 23:23:18.722 17508 17539 I Unity  : 

    08-16 23:23:18.723 17508 17539 I Unity  : AudioClip.SetData failed; AudioClip UnityAudioOut contains no data

    08-16 23:23:18.723 17508 17539 I Unity  : UnityEngine.AudioClip:SetData(Single[], Int32)

    08-16 23:23:18.723 17508 17539 I Unity  : Photon.Voice.AudioOutDelayControl`1:writeResampled(T[], Int32)

    08-16 23:23:18.723 17508 17539 I Unity  : Photon.Voice.AudioOutDelayControl`1:processFrame(T[], Int32)

    08-16 23:23:18.723 17508 17539 I Unity  : Photon.Voice.AudioOutDelayControl`1:Service()

    08-16 23:23:18.723 17508 17539 I Unity  : Photon.Voice.Unity.VoiceConnection:Update()

    08-16 23:23:18.723 17508 17539 I Unity  : 

    08-16 23:23:18.727 17508 17539 I chatty : uid=10625(com.AdeptReality.EdstutiaDev) UnityMain identical 9 lines

    08-16 23:23:18.728 17508 17539 I Unity  : AudioClip.SetData failed; AudioClip UnityAudioOut contains no data

    08-16 23:23:18.728 17508 17539 I Unity  : UnityEngine.AudioClip:SetData(Single[], Int32)

    08-16 23:23:18.728 17508 17539 I Unity  : Photon.Voice.AudioOutDelayControl`1:writeResampled(T[], Int32)

    08-16 23:23:18.728 17508 17539 I Unity  : Photon.Voice.AudioOutDelayControl`1:processFrame(T[], Int32)

    08-16 23:23:18.728 17508 17539 I Unity  : Photon.Voice.AudioOutDelayControl`1:Service()

    08-16 23:23:18.728 17508 17539 I Unity  : Photon.Voice.Unity.VoiceConnection:Update()

    08-16 23:23:18.728 17508 17539 I Unity  : 

    08-16 23:23:18.728 17508 17539 I Unity  : AudioClip.SetData failed; AudioClip UnityAudioOut contains no data

    08-16 23:23:18.728 17508 17539 I Unity  : UnityEngine.AudioClip:SetData(Single[], Int32)

    08-16 23:23:18.728 17508 17539 I Unity  : Photon.Voice.AudioOutDelayControl`1:Service()

    08-16 23:23:18.728 17508 17539 I Unity  : Photon.Voice.Unity.VoiceConnection:Update()

    08-16 23:23:18.728 17508 17539 I Unity  : 

    08-16 23:23:18.736 17508 17539 I chatty : uid=10625(com.AdeptReality.EdstutiaDev) UnityMain identical 20 lines

    08-16 23:23:18.736 17508 17539 I Unity  : AudioClip.SetData failed; AudioClip UnityAudioOut contains no data

    08-16 23:23:18.736 17508 17539 I Unity  : UnityEngine.AudioClip:SetData(Single[], Int32)

    08-16 23:23:18.736 17508 17539 I Unity  : Photon.Voice.AudioOutDelayControl`1:Service()

    08-16 23:23:18.736 17508 17539 I Unity  : Photon.Voice.Unity.VoiceConnection:Update()

    08-16 23:23:18.736 17508 17539 I Unity  : 

    08-16 23:23:18.737  667  667 D android.hardware.power@1.3-service.pixel-libperfmgr: AUDIO_STREAMING: 0

    08-16 23:23:18.737 17508 17539 I Unity  : AudioClip.SetData failed; AudioClip UnityAudioOut contains no data

    08-16 23:23:18.737 17508 17539 I Unity  : UnityEngine.AudioClip:SetData(Single[], Int32)

    08-16 23:23:18.737 17508 17539 I Unity  : Photon.Voice.AudioOutDelayControl`1:Service()

    08-16 23:23:18.737 17508 17539 I Unity  : Photon.Voice.Unity.VoiceConnection:Update()

    08-16 23:23:18.737 17508 17539 I Unity  : 

    08-16 23:23:18.743 17508 17539 I chatty : uid=10625(com.AdeptReality.EdstutiaDev) UnityMain identical 16 lines

    08-16 23:23:18.744 17508 17539 I Unity  : AudioClip.SetData failed; AudioClip UnityAudioOut contains no data

    08-16 23:23:18.744 17508 17539 I Unity  : UnityEngine.AudioClip:SetData(Single[], Int32)

    08-16 23:23:18.744 17508 17539 I Unity  : Photon.Voice.AudioOutDelayControl`1:Service()

    08-16 23:23:18.744 17508 17539 I Unity  : Photon.Voice.Unity.VoiceConnection:Update()

    08-16 23:23:18.744 17508 17539 I Unity  : 

    08-16 23:23:18.744 19108 19108 D PushInitializer: Attempting to initialize Push Messaging

    08-16 23:23:18.744 17508 17539 I Unity  : AudioClip.SetData failed; AudioClip UnityAudioOut contains no data

    08-16 23:23:18.744 17508 17539 I Unity  : UnityEngine.AudioClip:SetData(Single[], Int32)

    08-16 23:23:18.744 17508 17539 I Unity  : Photon.Voice.AudioOutDelayControl`1:Service()

    08-16 23:23:18.744 17508 17539 I Unity  : Photon.Voice.Unity.VoiceConnection:Update()

  • I can't reproduce this on my Android device. The input switches to "Android voice recognition input" and back to default mic without affecting the output. I can only assume that Unity output is reinitialized somehow on your device and invalidates Speakers. So they need RestartPlayback() call to recreate audio clips.

    We never needed explicit input switch on Android because default microphone always works correctly during devices plugging/unplugging. That's why we do not have device enumeration and selection support in Android native capture module (Photon mic type). Just curious, why one may need to switch the mic to "Android voice recognition input"?

  • "Just curious, why one may need to switch the mic to "Android voice recognition input"?" I was just choosing the last mic in the list assuming it would be the default built in mic on a phone maybe my device has more than one or that is the name of the default.

    I did some more testing in your demo scene DemoVoiceMinimal-Scene and I am still having the issue without my stuff changing things with the mic.

    I started the scene with my bluetooth headphones in my Google Pixel 2, I could hear and talk to others. I turned off the headphones and I could not hear anything and others couldnt hear me.

    Here is a link to the full log, the headset switching is near should be around page 331 at the end I noticed it says now "MicWrapper: Number of channels is 0 in Read()" before the repeat logs

    https://docs.google.com/document/d/1MpTiIAIzFbrLKOlyqVV40SwSB3sEqDEJPI28U48MzoE/edit?usp=sharing

  • You can try to recreate AudioSource's after Unity audio session reset to avoid 'AudioClip.SetData failed' error:

    Implement a handler for AudioSettings.OnAudioConfigurationChanged. In it you can then either

    - call Speaker.RestartPlayback(true) on all objects found with FindObjectOfType<Speaker>() call

    - or disconnect and re-join the Voice session.