Is it possible to use multiple audio recorders at the same time?

Hello all,

My client crashes with the story below:

I want to transmit two audio clips from different sources at the same time. One source will be microphone and the other one will be audio clip.

This is why i setup two different audio source prefab and instantiating them as soon as the client connects to a room.

Answers

  • Hi @dreamharvesters,

    Thank you for choosing Photon!

    The scenario you described is supported by Photon.

    What is the Photon Voice version you are using?
    What Unity version are you using?
    What is the platform you are targeting?

    Do you have any useful logs or crash report to share?
  • Hello @JohnTube

    Photon Voice version is 1.15
    Unity version is 2018.1.2f1
    Target platform is Android

    Below is the last entry of console:

    Receiving unhandled NULL exception
    Obtained 24 stack frames.
    #0 0x007fff64238232 in strlen
    #1 0x0000012d5a1d9f in g_strdup
    #2 0x0000012d503754 in mono_lookup_pinvoke_call
    #3 0x0000012d514ad9 in mono_marshal_get_native_wrapper
    #4 0x0000012d43495a in mono_method_to_ir
    #5 0x0000012d405cd2 in mini_method_compile
    #6 0x0000012d407763 in mono_jit_compile_method
    #7 0x0000012d407267 in mono_jit_compile_method
    #8 0x0000012d538194 in mono_compile_method
    #9 0x0000012d4783f3 in mono_magic_trampoline
    #10 0x000001247e6171 in (Unknown)
    #11 0x000001411d597f in ExitGames.Client.Photon.Voice.OpusCodec/Decoder:Open (ExitGames.Client.Photon.Voice.VoiceInfo) + 0xff (0x1411d5880 0x1411d59af) [0x12db86660 - Unity Child Domain]
    #12 0x000001411d43df in ExitGames.Client.Photon.Voice.RemoteVoice:decodeThread (ExitGames.Client.Photon.Voice.IDecoder) + 0x24f (0x1411d4190 0x1411d4eb5) [0x12db86660 - Unity Child Domain]
    #13 0x000001411d413f in ExitGames.Client.Photon.Voice.RemoteVoice:m__0 () + 0x9f (0x1411d40a0 0x1411d417a) [0x12db86660 - Unity Child Domain]
    #14 0x0000011d3b0a2a in (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr) + 0xfa (0x11d3b0930 0x11d3b0b5d) [0x12db86660 - Unity Child Domain]
    #15 0x0000012d409e62 in mono_get_runtime_build_info
    #16 0x0000012d53698a in mono_runtime_invoke
    #17 0x0000012d53b706 in mono_runtime_delegate_invoke
    #18 0x0000012d562690 in mono_thread_create_internal
    #19 0x0000012d592b46 in CreateThread
    #20 0x0000012d5b9022 in GC_start_routine
    #21 0x007fff64500661 in _pthread_body
    #22 0x007fff6450050d in _pthread_body
    #23 0x007fff644ffbf9 in thread_start
    Launching bug reporter
    [Performance] ApplicationTickTimer : 4919 samples, Peak. 2.97 s (457.5x), Avg. 6.50 ms, Total. 31.96 s (33.3%)
    [Performance] ReloadAllUsedAssemblies : 322 samples, Peak. 2.56 s (268.0x), Avg. 9.56 ms, Total. 3.078 s (3.2%)
    [Performance] Internal_SwitchSkin : 4920 samples, Peak. 1.07 us (7.5x), Avg. 143 ns, Total. 705.8 us (0.0%)
    [Performance] UnityConnect : 1002 samples, Peak. 7.62 ms (208.9x), Avg. 36.5 us, Total. 36.53 ms (0.0%)
    [Performance] VerifyUpdate : 4920 samples, Peak. 899 us (1718.2x), Avg. 523 ns, Total. 2.574 ms (0.0%)
    [Performance] Collab : 1002 samples, Peak. 979 us (279.3x), Avg. 3.51 us, Total. 3.512 ms (0.0%)
    [Performance] CEF : 1704 samples, Peak. 1.54 s (1282.8x), Avg. 1.20 ms, Total. 2.047 s (2.1%)
    [Performance] CurlRequestCheck : 576 samples, Peak. 965 us (255.8x), Avg. 3.77 us, Total. 2.173 ms (0.0%)
    [Performance] HubClient : 4920 samples, Peak. 29.0 us (61.5x), Avg. 471 ns, Total. 2.319 ms (0.0%)
    [Performance] SceneBackgroundTask : 414 samples, Peak. 1.07 us (4.0x), Avg. 266 ns, Total. 110.0 us (0.0%)
    [Performance] DoScheduler : 2677 samples, Peak. 2.87 ms (121.3x), Avg. 23.7 us, Total. 63.32 ms (0.1%)
    [Performance] RepaintAllProfilerWindows : 4592 samples, Peak. 1.09 ms (940.8x), Avg. 1.16 us, Total. 5.340 ms (0.0%)
    [Performance] HandlePlayerUpdates : 1002 samples, Peak. 72.0 us (2.8x), Avg. 25.7 us, Total. 25.76 ms (0.0%)
    [Performance] GlobalCallbacks : 4920 samples, Peak. 10.2 ms (185.0x), Avg. 55.4 us, Total. 272.5 ms (0.3%)
    [Performance] PreloadManager : 3699 samples, Peak. 507 us (39.5x), Avg. 12.8 us, Total. 47.53 ms (0.0%)
    [Performance] SceneTracker : 4920 samples, Peak. 35.4 ms (183.8x), Avg. 192 us, Total. 946.5 ms (1.0%)
    [Performance] ConsoleAndStatusBar : 192 samples, Peak. 202 us (27.9x), Avg. 7.25 us, Total. 1.393 ms (0.0%)
    [Performance] UpdatePackageImport : 193 samples, Peak. 6.08 us (9.2x), Avg. 663 ns, Total. 127.9 us (0.0%)
    [Performance] HierarchyWindowTick : 251 samples, Peak. 35.0 ms (173.8x), Avg. 201 us, Total. 50.54 ms (0.1%)
    [Performance] UpdateInspectorMonoBehaviours : 251 samples, Peak. 1.83 ms (7.0x), Avg. 262 us, Total. 65.64 ms (0.1%)
    [Performance] UpdateTooltip : 675 samples, Peak. 14.8 ms (206.8x), Avg. 71.5 us, Total. 48.28 ms (0.1%)
    [Performance] UpdateScene : 4591 samples, Peak. 336 ms (70.0x), Avg. 4.81 ms, Total. 22.08 s (23.0%)
    [Performance] UpdateVideoTextures : 3371 samples, Peak. 1.07 us (2.0x), Avg. 536 ns, Total. 1.807 ms (0.0%)
    [Performance] Video : 4591 samples, Peak. 52.0 us (33.6x), Avg. 1.55 us, Total. 7.111 ms (0.0%)
    [Performance] ChangeLayoutIfNeeded : 4919 samples, Peak. 18.0 us (137.5x), Avg. 131 ns, Total. 644.0 us (0.0%)
    [Performance] VCProvider : 4919 samples, Peak. 42.9 us (30.2x), Avg. 1.42 us, Total. 6.999 ms (0.0%)
    [Performance] RepaintAll : 3694 samples, Peak. 80.5 ms (1014.9x), Avg. 79.3 us, Total. 292.9 ms (0.3%)
    [Performance] UpdateConsoleLog : 127 samples, Peak. 320 us (40.9x), Avg. 7.83 us, Total. 994.2 us (0.0%)
    [Unity Package Manager (Upm)]
    Parent process [1062] was terminated
  • Hi @dreamharvesters,

    Could you try the following in order (stop if the issue is gone):

    A- another Unity version and see if it still causes the crash? stack looks more like internal mono crash while trying to find proper native method. so opus native lib itself is not even involved in the crash
    exactly the same issue. see https://issuetracker.unity3d.com/issues/editor-crashes-at-strlen-when-scripts-are-compiled

    B- get full logs, steps:

    1. clear/flush logs using "adb logcat -c"
    2. build and run app on device
    3. wait for crash
    4. get logs into a file "adb logcat -d > log.txt"
    5. send us log.txt

    C- send us minimal repro project.
Sign In or Register to comment.