Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

DeviceAudioTrackSource.CreateAsync() gives 0 avaliable source at Win32 x64 #830

Open
ysheung opened this issue Oct 24, 2021 · 1 comment

Comments

@ysheung
Copy link

ysheung commented Oct 24, 2021

Describe the bug
When we tried to call DeviceAudioTrackSource.CreateAsync() at our C# WPF project.
It always gives us 0 for Tracks.Count as reult.
MR-Webrtc seems works fine besides the sending audio part,
It is receving Video and Audio properly.

To Reproduce
Steps to reproduce the behavior:
1.Create DeviceAudioTrackSource by
var _microphoneSource = await DeviceAudioTrackSource.CreateAsync();
2.Then check _microphoneSource.Tracks.Count see how much is it.
3.The count is always 0.

Expected behavior
"Invalid interop handle to a native object" was throw because of
Microsoft.MixedReality.WebRTC.InvalidInteropNativeHandleException from Microsoft.MixedReality.WebRTC.dll
when we tried to add the AudioTransceiver.

Environment
Please fill the information for each peer if different

  • MR-WebRTC version release 2.02(NuGet)
  • Platform: Windows Desktop
  • Architecture: x64
  • Target device: Windows Desktop

Additional context
We have tried to use NAudio in same project that
Debug.WriteLine(WaveIn.DeviceCount);
Debug.WriteLine(WaveIn.GetCapabilities(0).ProductName);
gives us the proper audio capture device count and device name.
Is this problem related to those issue I have read about the ADM/ADM2?
We have also tried to rebuild the library but the libwebrtc.dll build failed.

Thank you for reading.

@ysheung
Copy link
Author

ysheung commented Oct 26, 2021

for a littlebit update,
_microphoneSource.Tracks.Count became 1 after calling LocalAudioTrack.CreateFromSource().

Seems it has get the device to capture but still nothing has been captured.
When we runing it in windows, it doesnt show the mic is using by the application.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant