views:

349

answers:

1

Hi guys, I'm having a hard time with this crazy Vista/Win 7 architecture, it might be just me but its hard to get used to it :|

So, my current problem is that I cant set the bass and treble values for my sound card, I found that there is a IAudioBass and IAudioTreble interfaces which can do this, but I'm getting lost how to create these interfaces, I know that I can use the IPart interface to activate them, but it doesnt work, and I guess I'm doing something wrong.

I started to do this in Delphi, but the header conversion took too much time and I just switched to Visual C++ to do it.

Does anyone have some demo source code ?

Thanks a lot for your attention folks !

+5  A: 

You want to start with the IMMDeviceEnumerator API which allows you to discover which of the endpoints on your sound card you want to modify.

You then activate an IDeviceTopology interface. You can walk the IDeviceTopology enumerating parts and activate the IAudioBass and IAudioTreble interfaces off of those parts.

The MSDN documentation for IDeviceTopology contains some sample code which does almost exactly what you're asking for.

I do want to warn you that relatively few current audio solutions have bass and treble controls these days.

Larry Osterman
Thanks a lot Larry, I finally got it working :)oh btw is there a way to change the speaker configuration on Vista/7, I know that this is possible in XP but cant do it in Vista and 7, my onBoard Realtek Audio Device Audio manager software can do this, and I'm wondering if there is some magical stuff there, I found on msdn forum some registry hacks, but that didnt worked for me :| After I changed the registry values I couldnt access the sound card configuration panel, grr.... only a restart could fix this.Thanks a lot, and thank you Larry for your support !
Andy