We help IT Professionals succeed at work.

Setting volume for CD/Mediaplayer?

Ronald112197 asked
Medium Priority
Last Modified: 2010-04-04
How can I change the volume for all kinds of sounds? *.wav and Audio-CDs? The TMediaPlayer does not have properties or methods for that. Too bad!

I probably need a WinAPI call but don't know which one.

Any ideas?

btw: Would be nice to get the current volume settings as well to warn the user if he's setting an alarm with sound turned off or very low...
Watch Question

There are some components vor all volume settings like you see in the windows tool - master, wav, midi, CD-Audio etc.

You have a component among some others in Gramy collection: http://web.access.net.au/%7Egchandle/

And I think you got one in the RX lib: http://rx.unionjv.ru

Cheers and good luck

PS these components come with sources so you can see what API calls they make...


Sorry guys: None of these seem to work in Windows NT - one of them explicitly says so, the other one simply doesn't :-((

P.S.: Sorry for being so slow... My e-mail address changed and I don't know where to change it here...
Unlock this solution and get a sample of our free trial.
(No credit card required)

Everybidy, I think I found the source of the problem:

The components we all found use the same function to set volume - auxSetVolume (look in Win32s.hlp).
I'm only not sure about Tom's last component because sources aren't included, but it says something like "Component to control the aux devices on the PC".
I guess that NT just doesn't supports this function, though it works perfectly in Win95.

I've found another possible answere, though I'm not sure how to use it:
If you look in the same old Win32s.hlp, you can find the value "MCIWndSetVolume". The help calls this thing a macro, and I don't really know how to use macros. I found an ActiveX control once that implements the MCIWnd animal though (I think included with VB). I'll try to find it again and see how it works.

One thing I know about a macro, and correct me if I'm wrong, is that it's some groop of operations that are easier to execute like this. So if MCIWndSetVolume is a macro, than it must consist of calls of some kind. So hopefully there is an alternative for auxSetVolume.


ooops - sorry, I was too slow and the question was autograded...

however, I think the answer doesn't really deserve more that a C - it probably took 30 seconds to post it and didn't help a whole lot...

I was looking for an API-call, not for a large and complicated component and even less for a URL that allows me to search for a component myself :-((

btw: I STILL haven't found anything that works in Windows NT! :-((((

Ronald, why didn't you say so, that you still didn't found anything? We can't smell it!

Zif, do you know what the help means when it says "MCIWndSetVolume macro"? How are we supose to run this one??? It might solve the problem with NT. All the components we find on the Delphi pages use auxSetVolume, and it might be meant only for '95.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.