Mumble-Unity icon indicating copy to clipboard operation
Mumble-Unity copied to clipboard

If I want to use this project without unity, where can I start

Open dextercai opened this issue 4 years ago • 10 comments

If I want to use this project without unity, where can I start

dextercai avatar Sep 28 '20 09:09 dextercai

It shouldn't be too hard, the main thing would be changing the MumbleAudioPlayer.cs and MumbleMicrophone.cs to use whatever audio output/input api you're using. I'd start by bringing in the scripts one-by-one and fixing the compiler errors as they arise

BananaHemic avatar Oct 03 '20 16:10 BananaHemic

I have tried use the mumble.Net and mumbleSharp. However, the voice quality is very bad with some sharp noise. I hope this repo well work well. It is diffcult to create a buffered playback mechanism....

dextercai avatar Oct 05 '20 10:10 dextercai

Voice quality was very good for me, if you're not happy with it you can also increase the bandwidth

BananaHemic avatar Oct 05 '20 14:10 BananaHemic

It is still hard for me. Do you have any plan about a pure C# version?

dextercai avatar Oct 09 '20 11:10 dextercai

What part is giving you trouble? I'm not currently working on this repo, so I have no plans for a full C# version

BananaHemic avatar Oct 09 '20 15:10 BananaHemic

I tried to use the Unity 2019 to open this repo, but it doesnt work any more. Can this project opened with the personal licence?

dextercai avatar Nov 20 '20 03:11 dextercai

Yes

BananaHemic avatar Nov 20 '20 04:11 BananaHemic

What part is giving you trouble? I'm not currently working on this repo, so I have no plans for a full C# version

The biggest problem is the jitter buffer, I always get the bad sound when the client is playing audio from other clients. I check the implementation in the Mumble-Unity. Just put the audio buffer into the AudioSource, when each time Unity executive update function, the sound will played well and smoothly.

dextercai avatar Jan 28 '21 09:01 dextercai

In case somebody would need an example solution, here is a Mumble-Unity working without Unity using NAudio 1.10.0. No changes to any of Scripts files have been made, it’s just a very basic reimplementation of UnityEngine namespace to get things to work. File Implementation/MumbleWrapper.cs is based on MumbleTester.cs. Mumble-Unityless.zip

gro-ove avatar Feb 02 '23 15:02 gro-ove

In case somebody would need an example solution, here is a Mumble-Unity working without Unity using NAudio 1.10.0. No changes to any of Scripts files have been made, it’s just a very basic reimplementation of UnityEngine namespace to get things to work. File Implementation/MumbleWrapper.cs is based on MumbleTester.cs. Mumble-Unityless.zip

You are a saint!

One thing I did find, your GetData method needs to wrap back to 0 as you end up going beyond the buffer length otherwise. In the for loop you need to do:

            for (var i = 0; i < pcmArray.Length; ++i)
            {
                if(i + offset >= _data.Length)
                {
                    offset = -i; // Start from 0.
                }

                pcmArray[i] = _data[i + offset];
            }

I was at a loss as I was struggling to get MumbleSharp working, but this has given me a fantastic starting point for implementing Mumble-Unity into my .NET application, so thanks!

BenWoodford avatar Oct 22 '23 11:10 BenWoodford