Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Reset an audio connection...

Avatar

Level 3

Hi,

Sometime I lost audio connection from one participant in particular (and I can listen other participants).

If I reset the audio stream with audioSub.resetAllStreams(); this will fix the problem.

Can I catch this ? I receive no event when this happens with audioSub.addEventListener(StreamEvent.STREAM_DELETE,deleteStreamAudio);

Thanks

Bernard

13 Replies

Avatar

Former Community Member

Hi Bernard,

When you call resetAllStreams in Subscriber, you are actually locally cleaning(stopping) all the streams that you were listening to and playing them again. You are not actually deleting the streams of other users. So, you won't receive an event.

STREAM_DELETE event is fired when a actual stream is deleted for e.g. you decided to stop your own audio. Why do you need to catch this ?

Thanks

Hironmay Basu

Avatar

Level 3

Yes, I know that Hironmay, but sometimes I lost connection (audio stream) from one participant and not from the other participants in the room. And when this happens, I'm the only one who losts this connection... why ? How I can catch this problem? I know that the audio stream of the lost connection is still there with the audioSub.streamCount and I can't correct this without a resetAllStreams (with a refresh button).

I use the Nellymoser codec (little more choppy than the Speex but the audio quality is better and crisper). Do you think that this might the problem ?

Bernard

Avatar

Former Community Member

Hi Bernard,

I don't suppose using NellyMoser is the problem(But you can test with speex codec to see if it makes any difference). The resetAllStreams was added for any dropped streams sometimes, which could be due to connection, firewall or many other reasons. So, I can't say offhand the reason behind the drop.

How consistent it is ? Is everyone using the room looses audio from that user or only you are loosing ?

Thanks

Hironmay Basu

Avatar

Level 3

Only one user at a time experiencing the drop connection... never at the same time. This has occured +/- 1 time for a long audio/video discussion and involved Mac users. But I can't tell you if it's only a Mac problem or a coincidence.

Bernard

Avatar

Level 3

How I can prevent this problem from happening again? listen to an event/drop audio connection is possible ?

I found this article in alccs about the same audio/drop stream :

http://forums.adobe.com/message/1982712#1982712

Bernard

Avatar

Former Community Member

Hi Bernard,

Are you switching from NellyMoser to Speex and vice versa at run time?

Also, I would be interested to know what are the Microphone parameters you are tweaking in your app ( specially framesPerPacket and silenceLevel). Messing up with these properties can lead to a drop in audio.

Normally RTMFP with Speex should give you very good quality without any drop. That article and forum mentions the use of RTMFP with Speex. But I guess you were using NellyMoser. What all changes you made to Microphone properties ? try removing the tweaks and see if you still see a drop in audio.

Thanks

Hironmay Basu

Avatar

Level 3

Hi Hironmay,

The audio drop connection is affected by the microphone settings ? As I told you before, if I make an audioSub.resetAllStreams(); this will fix the audioSubcriber connection. Then, I presume the problem is on the subscribe's side no ? This will not affect the audioPublisher ?

Example:

3 users in a room... (A,B,C and I'm user A).

I lost audioSub connection from B but C can listen to B and vice-versa...

Actual mic settings:

audioPub.microphoneManager.echoSuppression = true ;

audioPub.microphoneManager.gain = gainSlider.value;

audioPub.silenceLevel=0;

audioPub.silenceTimeout=10000000;

Bernard

Avatar

Former Community Member

Hi Bernard,

Are you using speex or Nellymoser now ? Can you remove the silence level tweak and see if you still have problem hearing B.

In reset all streams, we clear and replay the streams, so that sometimes fixes the drop problem. There are specific tweaks inside player for silenceLevel and frames per packet while using Speex. So, that may cause the problem. Can you send me a small test app or try running our Audio example with same microphone settings and tell us if you can reproduce the case ? That will help us pin point the issue.

Thanks

Regards

Hironmay Basu

Avatar

Level 3

Hi Hironmay,

I'm using Nellymoser, this is my code:

audioPub.microphoneManager.micIndex=microIndex; (from menu)

audioPub.codec = SoundCodec.NELLYMOSER;

audioPub.microphoneManager.echoSuppression= true ;

audioPub.microphoneManager.gain = gainSlider.value;

audioPub.silenceLevel=0;

audioPub.silenceTimeout=100000000;

audioPub.publish();

I don't use audioPub.microphone.rate.

I will remove silenceLevel and timout and I will try it...

Your Audio example is Audio.mxml in the sampleApps folder ?

Last question... to switch from an audio source to an other or from a groupname to an other, do I have to close the audioPub and reopen it ?

Bernard

Avatar

Former Community Member

Hi Bernard,

I will give a try , though its such drops even if there are very random and hard to reproduce. But change the silenceLevel property or use speex as codec to see whether you still get the drop.

Yes, the Audio example is in samepleApps folder. You can also try the PeerToPeerRTmfp example that has switches from Speex to Nellymoser and vice versa and see if you get the drop.

For groupNames, when you switch your publisher from one to another i.e do audioPublisher.groupName ="new group" , it will stop any stream that you were publishing in the previous group. So, to publish in a new group, you can do something likethis.

audioPublisher.groupName = "new group" ;

audioPublisher.publish() ;

Hope this helps.

Thanks

Hironmay Basu

Avatar

Level 3

Thanks !

I will try your apps.

Bernard

Avatar

Level 3

Some of my users also report a lost of audio after 20-40 min sometimes.

I just wrote a big 'reload with ctrl + R ' for now but i maybe i can do something about it.

Greg

Avatar

Level 3

Anyone else experiencing lost audio or video ?

Bernard