Quantcast
Channel: Answers by "PhobicGunner"
Viewing all articles
Browse latest Browse all 30

Answer by PhobicGunner

$
0
0
[Answered on the DaikonForge forums, copy pasted here.] public override bool IsLocal { get{ return true; } } There is your problem. So, for an object which is receiving audio data over the network, if this returns true it will not play back audio data. Basically, DFVoice assumes you have one voice controller object per player, in the same way that you might have, for example, one avatar per player. So, assuming you have clients A, B, and C, on client A you would have three of these objects - one object for client A, one object for client B, and one object for client C. When client A receives voice data sent from client B, it should pass that data to the object for client B. Therefore, IsLocal should return true if the object it is attached to belongs to the local client, false otherwise. So in the aforementioned situation, on client A's machine, the script on the object for client A would return true for IsLocal, whereas the other two (for client B and C) would return false. This way, if client A receives his own voice data, it is ignored and not played back (which would be distracting), but does play back voice data for clients B and C. Additionally, keep in mind these objects need to be separate because each one maintains its own instance of the codec, and the Speex codec cannot properly handle decoding different "streams" of audio (meaning one instance of the codec cannot properly handle decoding audio from both client B and C for instance, for this you need two instances of the codec, therefore two different game objects). Does this make sense?

Viewing all articles
Browse latest Browse all 30

Latest Images

Trending Articles





Latest Images