December 11th, 2012, 04:24 AM
[RESOLVED] [VB6]Set output volume level of MY application
I've already asked for this same question in several forums but I've not had valid answers or in some cases I've not had at all. So, I hope that here there's someone that could help me.
I'm trying to build up a little game and, as well as all games have a volume control, I wish to insert the same feature in my app.
Looking for on the net I discovered the waveOutSetVolume API function, that it might do what I want, but it doesn't. This API changes the WAVE output volume level of ALL programs currently running in the workstation, and not my only.
What I want to do is a volume control such Windows Media Player's one (that is the slider near the Play/Stop buttons), that controls the volume of the single application without modifying the system settings.
I know this is possible 'cause most of MP3 players do that (e.g. WMP, WinAmp, ect...) and also this feature is included within the MS DirectSound libraries.
Now you can ask me why I don't use them: because both WMP.dll and DirectSound don't allow me to play sounds asynchronously, while PlaySound API function do.
So my question is: does anybody know how to set my app output volume level of wav sounds played using PlaySound function without changing system settings?
If it's not possible or nobody knows, please tell me so I can try to ask on other forums, hoping that there there's someone knows.
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!