question

yugandharsaadili-1396 avatar image
0 Votes"
yugandharsaadili-1396 asked RitaHan-MSFT commented

waveInPrepareHeader()/waveInAddBuffer() is not returning anything its getting struck only for motorola manufactured dekstop mics and only if the mic is not a system default mic

Hi Team,

We are using windows mmeapi's for capturing the PCM data from mic device from very long time about 5 years.
We are familial with the API's and usage and capturing the PCM data from mic with winmm API's.

We are opening the device(Motorola Desktop Microphone [v1.0.0]) with deviceID with below configurations of of WAVEFORMATEX structure nChannels(1) wBitsPerSample(16) nSamplesPerSec(16000) nBlockAlign(2) nAvgBytesPerSec(32000) cbSize (22).

Device is opening successfully and able to get the handle for the device.
Then we are allocating the memory of 640 bytes and then calling waveInPrepareHeader() and then we we are calling waveInAddBuffer() accordingly as expected by passing required arguments.

Here we are trying to allocate 7 buffer counts i.e 7 time we will be allocating memory and calling waveInPrepareHeader() and waveInAddBuffer() accordingly.

after 3/4 iterations(waveInPrepareHeader(), waveInAddBuffer) its getting struck and its not returning anything Application is getting blocked.

Note: This issue is facing only if "Motorola Desktop Microphone [v1.0.0]" Device is not a system default mic.
Same code base /application is working if the system default mic is set to "Motorola Desktop Microphone [v1.0.0]"
We are able to capture PCM mic data from the same device without any issues able to capture by opening with WAVE_MAPPER and as well as with device ID.
Only issues exists if the device "Motorola Desktop Microphone [v1.0.0]" is not a system default mic and if try to capture data from mic by opening the device with device ID.

Thanking you in Advance


windows-apic++
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Since you mentioned that "only for motorola manufactured dekstop mics", it seems a driver related issue. Can this issue be reproduced in latest Windows 10 version?

0 Votes 0 ·

Hi RitanHan Thank for your reply.

Issue was observed on Edition : windows 10 pro
version : 1809
Os build : 17763.1098


Same "Motorola Desktop Microphone [v1.0.0]" is working fine with google meet application even if the system default mic is not the Motorola Desktop Microphone [v1.0.0].

waveInPrepareHeader()/waveInAddBuffer() is getting struck only if the default mic is not the "Motorola Desktop Microphone [v1.0.0]" and if we open the device with devcieID.

0 Votes 0 ·
RitaHan-MSFT avatar image RitaHan-MSFT yugandharsaadili-1396 ·

Thanks for confirmation. Could you create a dump file of your application process when waveInPrepareHeader()/waveInAddBuffer() is getting stuck? And if you can share a mini, complete and reproducible code sample I can do a further investigation.


0 Votes 0 ·

0 Answers