I’m writing an application that allows users to talk to each other as well as record snippets from their own microphones. I’m using a library for the VoIP part that I don’t have source code for, so the recording part has to be a separate Flash application.
When one Flash app is using the microphone, the other doesn’t seem to get any data from it. This happens when the two apps are on the same page and when they’re in separate windows of the same browser, but it works fine if they’re in separate browsers, so it’s not an OS-level problem.
Both apps are using NetStream.attachAudio to publish the microphone to an RTMP server.
Is there a way to allow both apps to access the microphone at the same time?
It turns out the VoIP flash app was using acoustic echo cancellation, an advanced Flash microphone feature that blocks other Flash apps from accessing the microphone at the same time. See “Limitations of using enhanced audio” in this article: http://www.adobe.com/devnet/flashplayer/articles/acoustic-echo-cancellation.edu.html#articlecontentAdobe_numberedheader_2
The only solution is to disable this feature in the VoIP app.