Volume Issues with NetStream

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Volume Issues with NetStream

Erik J. Thomas
Hey all:

I'm using the flash enhanced microphone (to help reduce echo), a NetConnection, and a NetStream to broadcast live audio between mobile devices using Adobe Media Server. This is an audio walkie talkie feature where only one person can speak at a time. When the user releases the speak button, others can press to speak.

However, the first time someone talks, all remote devices receive the audio loud and clear. The device volume is perfect. But once a second person speaks, the volumes on all remote devices drops by 50% or more. It still works, but it's hard to hear.

I've tried setting the microphone volumes to various levels between 50 and 100 and the problem always occurs. I've tried other experiments like FULL_DUPLEX mode and various other settings, but they don't change this issue.

Web searches are not finding anything about this either.

Thanks for your ideas.

Erik

Here are my microphone settings in case it's something I'm doing wrong.
_microphone = Microphone.getEnhancedMicrophone();
var options:MicrophoneEnhancedOptions = new MicrophoneEnhancedOptions();
options.mode = MicrophoneEnhancedMode.HALF_DUPLEX;
options.echoPath = 128;
options.nonLinearProcessing = true;
options.autoGain = false;

_microphone.enhancedOptions = options;

_microphone.codec = "Speex";
_microphone.enableVAD = true;
_microphone.encodeQuality = 4;
_microphone.framesPerPacket = 2;
_microphone.rate = 5;
_microphone.setSilenceLevel(0);
_microphone.gain = 70;

Reply | Threaded
Open this post in threaded view
|

Re: Volume Issues with NetStream

bilbosax
Erik, you are always so generous with your help on this site, I wish I could
give you a nugget of information.  Alas, I have no experience with this even
in the slightest and can offer no help.  I'm sure you already thought about
it, but the first thing that popped into my head is if the volume level of
the individual's device could affect the volume level that everyone else is
hearing it at?  If so, maybe you would have to override the volume of the
individual device and set a standard volume manually.

I know it is a stretch, and likely not related at all.  I was just thinking
that it possibly was not related to the gain level of the mic, but the audio
level of the speaker.

Just a thought.



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Volume Issues with NetStream

Erik J. Thomas
Thanks for your kind words, and for your suggestion. It turns out that you suggestion is right on! I added these calls:
SoundMixer.audioPlaybackMode = AudioPlaybackMode.VOICE;
SoundMixer.useSpeakerphoneForVoice = true;
SoundMixer.soundTransform.volume = 1;
And the Android playback volume is much, much better, but it still decreases by about 20% after the first exchange of audio messages but stays the same level from there so we can live with it and will release the app.

I found about about this based on a reported bug (still open) against AIR. Another issue related to the volume on Android is the fact that AEC won't work on Android. Not since AIR 24 has it worked. But AEC works on iOS reasonably well. But the AEC algorithm appears to reduce playback volume as part of it's solution to reduce echo, which is likely part of the root cause of the android volume.

Here is the bug. Please vote on it. :-)

https://tracker.adobe.com/#/view/AIR-4195154 

Thanks for your help!

Erik

On Feb 20, 2018, at 10:58 AM, bilbosax <[hidden email]> wrote:

Erik, you are always so generous with your help on this site, I wish I could
give you a nugget of information.  Alas, I have no experience with this even
in the slightest and can offer no help.  I'm sure you already thought about
it, but the first thing that popped into my head is if the volume level of
the individual's device could affect the volume level that everyone else is
hearing it at?  If so, maybe you would have to override the volume of the
individual device and set a standard volume manually.

I know it is a stretch, and likely not related at all.  I was just thinking
that it possibly was not related to the gain level of the mic, but the audio
level of the speaker.

Just a thought.



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/