adrenak / univoice

Voice chat/VoIP solution for unity.
http://www.vatsalambastha.com/univoice
MIT License
363 stars 36 forks source link

Sample for other audio input then mic? #31

Open ChrisEL20 opened 9 months ago

ChrisEL20 commented 9 months ago

Hi Sorry it's not really an issue more a question. I'm trying to use univoice to send game audio from a audio clip from the host to all clients but i'm actually not an audio expert. I tried to write a new IAudioInput but to only thing i don't get is how to do the reading of the data correctly. Also because it's not sent each frame and has to be recorded and then sent like in the ReadRawAudio() in the UniVoiceAudioSampler.cs. So i wanted to ask if you maybe have a sample script for sending audio other then the mic?

Best

adrenak commented 9 months ago

Hi @ChrisEL20 ,

Can you provide more info on what audio you want to send? From what I understand you want to send in-game audio, whatever is happening in the host's game, to the clients? This should be possible with OnAudioFilterRead

I don't have a script for this yet, but this looks like a good input method I can add so univoice could have it out of the box. If you have made some progress feel free to give me a boost by sharing if you can (my email is in my GH profile page)

Let me know if I've not understood your question properly.