Expand my Community achievements bar.

reliability of audio streams

Avatar

Level 2

Our chat application manages to make an audio connection about half the time.  I noticed that ChatRoulette also sometimes has problems broadcasting audio.  Is this just a general issue with Flash Player and the compatibility of various microphones and operating systems?  Or, is it generally possible to get lccs audio connected very reliably?  Are there any good examples of applications on lccs with reliable audio?  Also, is the Speex codec the default?  It seems to be but the other one is still listed as the default in the docs.

6 Replies

Avatar

Former Community Member

Hi,

LCCS audio I would say is quite reliable. Customers are using it. You may have echocancellation issues as its flash based but the audio shouldn’t break down. Let us know if you find any such problem consistently.

For examples of LCCS Audio, go to sampleApps folder and look for the Audio example.

Yes, Speex is not the default, but Nellymoser is. You can easily change your codec to SPeex with ur API. The PeerToPeerRtmfp example shows how to switch between speex and nellymoser. All you need to do is to set the codec property in AudioPublisher to Speex. And yes, you should have the player 10 or 10.1 swc to use Speex codec.

Avatar

Level 2

Thanks, I actually noticed a very reliable way to reproduce my issue.  It has something to do with logging out of the room and into a new one - only the person who initiates the switch loses their audio.  It's still not clear to me whether it is necessary to stop a stream before leaving a room, or what is the proper way to do so.  When I used the stop() method on AudioPublisher it pointed out that I don't have permission to delete a stream.

Avatar

Former Community Member

You don't need to stop your audio, the items get automatically retracted and I saw in code that on logout i.e. synchronization as false , audiopublisher does clear the audio and the stream. So, this behavior sounds strange. Can you send me your room switch code ?

Thanks

Hironmay Basu

Avatar

Former Community Member

Btw, there was a bug on this fixed in last SDK release in Mid-April. Do you have the latest SDK ?

Thanks

Hironmay Basu

Avatar

Level 2

Yeah, I remember the patched components well, the "SubClass" as I think you called it

We are using the new SDK now and I've removed the patched components from our project.

Even after removing the code that stops the audio I'm getting the same behavior.  Here's some code.

When someone clicks 'next' we make a request to determine if we want to let them move on.  Then they log out of the session and ask for a new room.

private function nextClick(evt:ResultEvent):void

{

     if (String(evt.result) == "go") {

          yourCam.visible = false;

          _checkinTimer.stop();

          if (cSession.isSynchronized) {

               cSession.logout();

          }

          getRoom.send(params);

     }

}

When they get a room we log into it and start checking in every 5 seconds.

private function roomResult(evt:ResultEvent):void{

     var match_result:Array = String(evt.result).match(/randomdorm(\d+)/);

     _roomID = match_result[1];

     if (_roomID) {

          cSession.roomURL = String(evt.result);

          cSession.login();

          _checkinTimer.start();

     } else {

          getRoom.send(params);

     }

}

After each checkin we determine if you're still with the same person (it seems like it was more reliable to do this asynchronously).  startPublication gets called repeatedly but it has conditionals such that it only calls publish() if the publishers are not already publishing.

private function onCheckInUser(evt:ResultEvent):void

{

     _user1id = "";

     _user2id = "";

     _usersInRoomResult = evt.result.hash.occupants;

     _usersInRoomMatchResult = _usersInRoomResult.match(/(\d+)/);

     _user1id = _usersInRoomMatchResult[1];

     _usersInRoomMatchResult = _usersInRoomResult.match(/,(\d+)/);

     if (_usersInRoomMatchResult) {

          _user2id = _usersInRoomMatchResult[1];

     }

     if (_user2id != "") {

          startPublication();

     } else {

          if (yourCam) {

               yourCam.visible = false;

          }

     }

     _previousUsers = _usersInRoomResult;

}

Avatar

Former Community Member

Hi ,

I ran these following cases in a two rooms with a simple example as I was not clear on parts of your code.

Case 1:

User A in Room 1.

User B enters Room 1 and shares his audio. User A can hear User B.

User C is in Room 2.

User B logs out of Room 1 and login into Room 2 and starts sharing his audio again. User C is able to hear User B now in new room while User A doesn’t hear anything now.

Case 2:

User A is in room 1 sharing his audio.

User B comes in room 1 and can listen to User A.

User C is in Room 2 and is sharing his audio.

User B now logs out of room 1 and goes into room 2 and he is now able to hear User C.

Both these case work with a simple example test file. Can you run your use case and making any modifications to the test file( I will attach with this email) and let me know the issue.

Hope this helps

Thanks

Hironmay Basu

Here is kind of a sample file I used.

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:session="com.adobe.rtc.session." xmlns:authentication="com.adobe.rtc.authentication." xmlns:pods="com.adobe.rtc.pods.*"

xmlns:collaboration="com.adobe.rtc.collaboration." xmlns:subclass="">

<session:ConnectSessionContainer roomURL="my first room" width="100%" height="100%" id="cSession" synchronizationChange="init()">

<session:authenticator>

<authentication:AdobeHSAuthenticator userName="guest"/>

</session:authenticator>

<collaboration:AudioPublisher id="blah"/>

<collaboration:AudioSubscriber/>

<mx:Button id="logoutButt" label="logout" click="onLogoutClick()"/>

</session:ConnectSessionContainer>

<mx:Script>

<![CDATA[

protected function init():void

{

if (cSession.isSynchronized) {

blah.publish();

}

}

protected function onLogoutClick():void

{

if (logoutButt.label=="logout") {

logoutButt.label = "login";

cSession.logout();

} else {

cSession.roomURL = "my second room"

logoutButt.label = "logout";

cSession.login();

}

}

]]>

</mx:Script>

</mx:Application