Question

I'm using WASAPI to capture and render audio for a VoIP application on Windows Phone 8. The app works fine when using the earpiece, but as soon as I switch to speakerphone, a distinct clicking noise appears on the far end. Looking into the timing of my system, I found that after I switched endpoints to speakerphone the mic hardware timer starts to act weird.

My audio loop starts with a WaitForMultipleObjectsEx which is woken up every 10ms by the mic capture event. After switching audio endpoints, I find this this event fires 101 times in 1 second, instead of 100. Every second, the last capture of 480 frames is split into 2 captures, whose timings add up to 10ms. This confuses me to no end, and is causing problems in my audio system. Does anyone know what is going on, or can someone point me in the right direction?

Was it helpful?

Solution

MSFT is officially looking into a bug in WASAPI caused by multiple endpoint switches. It is confirmed on RT and being investigated for Wp8. Just an update.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top