PhotonVoice Audiosource
Options
in Photon Voice
Is there any way I can make an AudioSource be the source of the Recorder instead of just an audio clip?
The only "solution" I though of was, outside Unity send all the system audio to a virtual microphone input in order to mimic the microphone audio.
The only "solution" I though of was, outside Unity send all the system audio to a virtual microphone input in order to mimic the microphone audio.
1
Comments
-
I'm also looking into getting audio from my game generated by the player to the rest of the players. I was thinking of doing this using photon voice, but no luck so far.
If anyone know of a better idea of doing this, please help0 -
To stream custom audio source, you need to implement IAudioPusher or IAudioReader (with float type parameter). For details see http://forum.photonengine.com/discussion/comment/39487/#Comment_39487
I think OnAudioFilterRead may be used for AudioSource data capture. In that case call IAudioPusher instance callback with buffer passed to OnAudioFilterRead.
1 -
hey @davidvfilipe, @mfontoura,
thank you for choosing Photon!
what my colleague @vadim is hinting can be also found here: "How to use a custom audio source with PhotonVoiceRecorder?"1 -
Hi @vadim and @JohnTube , first of all thank you guys for the help.
In my project the data is driven by the producer so I opted to use the Voice.IAudioPusher interface and implemented the SetCallback method along the lines of the ToneAudioPusher in AudioUtils.cs but I keep getting this error while trying to associate this script to an empty Game Object on inspector.
https://drive.google.com/open?id=1bIp4s1Mq-LSCQgQKByFKNesVXO984ES_
0 -
Hi @davidvfilipe,
That's a Unity problem.
Make sure:
- "MyAudioPusherSource" is in ""MyAudioPusherSource.cs" file (same name is required for both class and file)
- "MyAudioPusherSource" is extending MonoBehaviour to be added to the scene attached to a GameObject.0