Can't make microphone work on Flex
-
12-09-2019 - |
Question
A Adobe Flex issue...
I'm attaching a microphone to a NetStream, but there is no mic activity. The privacy is set to Allow, the microphone.muted is false and the activity level is -1.
Only when I open the flash settings, and open the Microphone tab, it starts to dispatch the Activity events, and it starts to stream the audio.
Also, when I start to loopBack it starts working. But I don't want loopBack.
Did you have the same problem? I hope I was clear.
Solution 2
Ok, I found what is the problem!
Just before I attached the microphone to the NetStream object, I was doing setLoopBack(false)
When I commented that code it started streaming the audio right away.
I have done that because in some test versions I needed to LoopBack. I was stuck because I was setting loopback to false. I just needed to comment it.
OTHER TIPS
Are you sure you called getMicrophone
properly? The documentation clearly states:
If the microphone is available but is not yet being used because Microphone.getMicrophone() has not been called, this property is set to -1.
You have to initialize the microphone, like so: myMic = Microphone.getMicrophone()
.