I am trying to make a "room chat" using cirrus
in a single room, a few (1-5) user connect and talk (audio only)
I am using:
|_outgoingStream = new NetStream( _netConnection, _groupSpec );|
|_outgoingStream.bufferTime = 1;|
|_outgoingStream.audioReliable = false;|
|_groupSpec = _groupSpecifier.groupspecWithoutAuthorizations();|
|_incomingStream = new NetStream( _netConnection, _groupSpec );|
|_incomingStream.bufferTime = 1;|
|_groupSpecifier = new GroupSpecifier(mSessionID);|
|_groupSpecifier.multicastEnabled = true;|
|_groupSpecifier.postingEnabled = true;|
|_groupSpecifier.routingEnabled = true;|
|_groupSpecifier.serverChannelEnabled = true;|
I tried multiple different combinaison of all the above.
and the microphone config:
|var mic:Microphone = Microphone.getEnhancedMicrophone();|
|mic.codec = SoundCodec.SPEEX;|
|mic.gain = 50;|
|mic.framesPerPacket = 1;|
The problem is, I'm getting HUGE latency of the audio
(between 5 and 15 seconds!)
And when I connect with skype on the same target, I get under 1 sec
Could you help me define what are the best settings for what I am trying to achieve?
-> groups of 2-5 ppl, all connected together to talk
I dont care much about sound quality, but more about latency.
I guess group wasn't a good option at all..
using Direct_Connections is fine
When using groups, what's going on with the voice-data to create such a lag? Is it routed on Adobe's servers?
P2P multicast (group NetStream) has an inherent delay as part of its operation. the data is not going through Adobe servers. this is mostly to do with the reassembly window (controlled by the NetStream.multicastWindowDuration property).
to get an idea of how P2P multicast works in RTMFP, watch
starting at around 36:00.