Mysterious MCI Problem

-Richard-
-Richard- used Ask the Experts™
on
I have an OCX control written using VB6 which uses MCI to implement an on-screen tape-recorder-style interface -- stop, start, record, play, rewind, etc.   The microphone I'm using is a Philips SpeechMike Pro Plus, which is a highly specialized microphone typically used in turnkey systems like the one I'm working on.

The problem is that this control works fine on a majority of computers.  However, on some computers, it fails to open the SpeechMike with the following error:  

"Cannot set the current wave device for recording because it is in use.
Wait until the Device is free, and try again. "

I'm darned if I can find any other task running that imight be using the microphone.   One issue is that the control has to support multiple operating systems.  It generally, although there are exceptions, works on machines running Windows XP.  However, under Windows 7, the problem happens invariably.

Can anyone recommend a good way to track down what task may be keeping the microphone open under Windows 7? Or, is this some kind of Windows 7 compatibility issue?   Experts, your thoughts will be greatly appreciated!!!!!   Thank you in advance!


Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Which version of VB are you using?

Have you tried to enumerate the audio inputs so that you can control them?  Take a look at this project: http://www.mp3vcr.com/stads/ 
This person shared their VB6 code on how to control audio devices, maybe that would give you some ideas.

Author

Commented:
I am using VB6.

I downloaded the project code and took a look.  Pretty interesting, but not quite what I needed.  My code is already successfully querying the audio devices and the SpeechMike shows up in the list as it should.  However, the problem occurs when I try to open the mike for recording.  The mike refuses to open with an error message indicating it is already in use, but I don't know why that should be the case.  I am unaware of any other process on the system that would be using it.   I would love to find some type of utility that could tell me what processes have connected to audio devices, or some information regarding how to write such a utility.  Also, I wish I knew why the problem appears primarily under Windows 7.  

Commented:
OK, let's try AutoRuns (http://technet.microsoft.com/en-us/sysinternals/bb963902).  Download this to the Win7 system and temporarily disable as many programs that start with Windows as possible, even if it seems unlikely to be related.  Then restart the system with it set this way and see if you can use your app.  I'm pretty confident there must be something taking control preventing your app from working correctly.

- If your app works with everything you can possibly disable set to not start, then it's a matter of elimination.  
-- Turn on anything that seems obviously not related, restart and try again.  Verify your app still works.  
---If it does not, something that you re-enabled must be the culprit.  
---If your app continues to work, then start eliminating more things and rebooting.  I usually use a binary sort mentality -- enable half of what's left; does the problem follow the half that was enabled or the half that was left disabled, and repeat until you narrow down the culprit(s).
----Then report what you find.

- If your app still does not work with all the startup apps disabled, double check to see if there is anything else you can disable, just in case you missed something.  Beyond that, my next suggestion would be to uninstall/reinstall the audio driver, and/or possibly look for an updated driver version (you may have already done this though, but doing it with almost everything disabled may make a difference if it couldn't get installed properly the first time with everything else running.)

If you go through all that and don't find a cause, you may need to dig into UAC.  You could try disabling UAC, or bypass security restrictions with any of the following:

Method 1: Disable or Turn Off UAC (User Account Control) in Control Panel
1.    To user Control Panel to disable UAC in Windows 7, login the system with the administrative account, go to Start Menu -> Control Panel -> User Accounts
2.    Click on Change User Account Control settings link.
3.    Slide the slider bar to the lowest value (towards Never Notify me when)
For more information about those four values, please refer to the following webpage
User Account Control (UAC) settings in Windows 7
4.    Click OK to make the change effective.
5.    Restart the computer to turn off User Access Control.
 
Method 2: Right-click the software and point to Run as Administrator
 
Method 3: Enable and login the system with default local Administrator
(Source: http://social.technet.microsoft.com/Forums/en/w7itprosecurity/thread/b2bfa42c-7ad8-4b4c-ac23-60aa206810f8)

Or you could try these ideas: http://www.mydigitallife.info/how-to-disable-and-turn-off-uac-in-windows-7/

Let's see where those ideas get you.
Success in ‘20 With a Profitable Pricing Strategy

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
Thanks KBirecki, I don't have access to my Win7 machine tonight, but will try your ideas in the morning.

Commented:
OK.

Author

Commented:
Sorry for the delay in getting back to you.  I've experienced a frustrating lack of progress, unfortunately.    That AutoRuns program was quite interesting and I used it to turn off everything I could imagine, but without affecting the symptoms.  UAC is turned off and my account has administrative privileges anyway.  I even tried booting in Safe mode, but that didn't work because it turns out the Windows Audio services aren't running which prevents anything audio-related from working at all, and you can't even start them because they are forbidden in Safe Mode.  

One thing I discovered is that the error is not occurring when the audio device is opened - it actually occurs when the program attempts to record from the microphone.   That's a bit of a surprise, you'd think that if something else was using the microphone, it would get an error when it was opened.

One complexity is that the Philips SpeechMike is a "dual" audio accessory, meaning it has a speaker built-in to it in addition to being a microphone.  So it has both an input and an output function, and when it's functioning properly all sounds comes out of its speaker rather than the computer's.   Additionally it has a trackball and buttons built into it, and even when it refuses to record from the microphone, you can still control the cursor and the user interface with the trackball and buttons.   It's really closer to a game controller than a simple microphone.  

Another relevant fact is that the SpeechMike is a USB accessory.  I wonder if it's possible the conflict is over the USB port and actually has nothing to do with the audio at all?

Quite the mystery here.  I wish EE would let you assign 1000 points to a question, this one's worth it.

Any further ideas?

Thanks,

Richard

Author

Commented:
Oh yeah, one more thing - the Philips driver is the latest version too.  Nothing but dead ends, I'm afraid!
Commented:
OK, back to basics.  Can you disconnect the Philips USB mic/spkr/trackball/button/sock-washing/everything-and-the-kitchen-sink (WOW!) device, and instead try a basic USB mic.  If you don't have another USB mic to try, you might try a basic Line-In-type mic with your software just to see that the software side of things is working.  We need to determine, as I think you were saying, if the mic itself is working as expected, or part of the problem.

Also, some devices like that have control panel applets that allow further control.  Maybe there are settings that you can disable everything but the mic.  Can you check that?

Author

Commented:
Good suggestions regarding trying different microphones.  Will give it a try tomorrow.  
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
I've requested that this question be deleted for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Author

Commented:
The problem ended up going away by itself rather mysteriously, but kBirecki's comments were hepful and he should be awarded the points for his effort.

Author

Commented:
The problem went away by itself but kbirecki's comments were helpful.

Commented:
Richard, thanks for the consideration for the points.  Be sure to check that you have everything turned back on in AutoRuns.  I've inadvertently left things off (originally with intent, but then forgot about it) to see how things function over time.  You don't want to find out later something was turned off and that's why it isn't working.
It's good your problem went away.  Hopefully it stays fixed.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial