Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dextercai opened this issue Sep 28, 2020 · 10 comments
Open

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

dextercai opened this issue Sep 28, 2020 · 10 comments

Comments

@dextercai
Copy link

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

@BananaHemic
Copy link
Owner

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

@dextercai
Copy link
Author

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....

@BananaHemic
Copy link
Owner

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

@dextercai dextercai reopened this Oct 9, 2020
@dextercai
Copy link
Author

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

@BananaHemic
Copy link
Owner

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

@dextercai
Copy link
Author

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?

@BananaHemic
Copy link
Owner

Yes

@dextercai
Copy link
Author

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.

@gro-ove
Copy link

gro-ove commented Feb 2, 2023

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

@BenWoodford
Copy link

BenWoodford commented Oct 22, 2023

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!

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

No branches or pull requests

4 participants