Problem with microsofts Audioclient

delphi package - easy access to kernel objects etc.
Post Reply
neji
Posts: 155
Joined: Wed Mar 09, 2005 11:39 am
Contact:

Problem with microsofts Audioclient

Post by neji »

Hi there, I don't know if this is the right section for my question.

If I start the "sndvol32.exe" and go to the Record tab I Have this window :

Image

Is it possible to change the checkbox from "Mikrofon" to "Stereo Mix" by Code, without open the application?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

You can try using FindWindow(nil, 'Aufnahme') to check whether the window is accessible when it's not visible. If yes, you might be able to change the checkbox unseen. Otherwise I would give up in your case.
neji
Posts: 155
Joined: Wed Mar 09, 2005 11:39 am
Contact:

Post by neji »

:(

I thought there is some kind of API I could use, so I don't have to open the application every time....

Theres one more little "problem". To get to the 'aufnahme' window, I have to open the application and send a few keys to the app. (The Window isn't created at startup :( )

At this time I use the SNDKEY32.pas with :

AppActivate('Lautstärkeregelung');
SendKeys('(%o)e(%a){TAB 2}{ENTER}',true);

Is there a better way to get to this window?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

If FindWindow works, you do eventually NOT have to open the app!
neji
Posts: 155
Joined: Wed Mar 09, 2005 11:39 am
Contact:

Post by neji »

Sorry, I'm confused now :oops:

If I do FindWindow(nil,'Lautstärkeregelung') and didn't opened the app before it returns 0. How should the window exist without the application is opened? :sceptic:

Anyway : If I start the app, FindWindow(nil,'Aufnahme') returns 0 too, so it seems , that I have to get to this window manually didn't I?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Well, a window can be there, but hidden. Then FindWindow still works. But if you 0, then evidently that's not the case for the Lautstärkeregelung. So that means you'll have to either do all the ugly visual stuff like SendKeys etc, or maybe there are APIs to switch sound options. But I don't know that.
Post Reply