-
Notifications
You must be signed in to change notification settings - Fork 283
Error init PeerConnection #141
Comments
ADM is Audio Device Module. I assume you don't have a microphone, or you have a connected audio device that is not supported. Due to some bug in the Google code, this makes ADM initializing fail, and there is nothing we can do about it for now. See #140, #124 and the Google bug https://bugs.chromium.org/p/webrtc/issues/detail?id=11081. If you can please confirm this is a likely reason, I will close this bug as Duplicate of #124. |
I have plenty of audio devices (35 input devices to be exact...) on the Win10 computer, the default is a microphone. I just tried a to set a different input device as default but same result. Follow up question, will I be able to feed the Local audio with PCM data, and not use a sound card directly? |
Not at the moment. I am working on this feature for video right now (#35), as this is the one feature everyone seems to want, and depending on how much signal we get from other users about the need for that for audio data we can also consider adding it. That would make sense I think. But it is not planned at the moment. Currently audio data goes directly from a sound card (capture) to another remote sound card (output) without any possible way to intervene; this is how it is implemented by Google. There is some on-going work to open up the PCM data on the receiving side, for example to inject it into the Unity DSP engine and enable spatial audio etc., see #92 and #99. |
Note that if 1 audio device is not supported, then no matter which one you select, the ADM init will fail. The only workaround is to physically disconnect the unsupported device(s). For example anything that has not 1/2/4 audio channels, like Azure Kinect DK (7-microphone array) will make ADM init fail. There is a patch on Google's master branch to fix that strange behavior, and only test the actually selected device (not all the available one) but it's not merged into MixedReality-WebRTC. |
In my case I 'm only interested in audio (no need for video at all). But I need to be able to feed and receive PCM data. Preferably that the WebRTC handles the jitter and buffer, and with a callback for when PCM data is available (for receiving). And future feature request is to be able to use other audio codecs, even Linear PCM. I know browsers do not support that, but P2P between two Windows App will work. |
I will try the code on a laptop where I have only the standard audio devices, |
For audio codecs, PCM mu-law (PCMU) and A-law (PCMA) are both supported. Here's the full list of audio codecs I get on my local Desktop machine: a=rtpmap:111 opus/48000/2 |
Those are the typical WebRTC codecs, OPUS is great. The audio transport in WebRTC is RTP and what you fill the payload with could be a custom Codec (say MP3). It will not work to a browser to between two Win Console app as long as I have control over the RTP. Any way that's not important for now, PCM in/out instead of sound-card so I can integrate this hopefully great WebRTC library is what I need most. |
Just to confirm, when testing on my laptop with just the standard audio devices. I get no ADM error. It works, I can connect and pass audio between two console apps. |
Right, thanks for the feedback. I am pretty sure this is ADM1 again doing it's overly aggressive checks. I will see if we can backport that fix from Google. |
Still no fix for this for Unity Editor? Edit: I had to disable the Oculus microphone. Working fine now. |
Hi,
Using C# "TestNetCoreConsole" , v1.0.2 of Microsoft.MixedReality.WebRTC (nuget) and latest VS2019. .NET Core 3.0
I get this error after a few sec after calling:
await pc.InitializeAsync(config);
What am I doing wrong here?
The text was updated successfully, but these errors were encountered: