Forum > Windows

play sound - loud ! - but only individually

(1/1)

Nicole:
I use a TPlaysound to play a wav. Works fine.
Usually I have my Windows set to 5% sound intensity during the day.
This very Lazarus program (an alert) would be not heard at 5% at all.

How can I make the Lazarus item play louder, -  without changing the general setting of Windows?
Windows has an individual setting for every software, but it does not keep it after restart. And it takes an eternity to find.

So it would be great to have some lines of code, which will change this by code e.g. on the create-event of my program.

Thanks in advance,
Nicole

Zvoni:
Found something: https://www.nirsoft.net/utils/app_audio_config.html

--- Quote ---Starting from Windows Vista, you are allowed to change the sound volume of every application separately, and after you exit from the application, the last settings are saved in the Registry under HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\LowRegistry\Audio\PolicyConfig\PropertyStore so in the next time you run the application, your last settings are used.

--- End quote ---

For my VLC-Player it looks like this: Computer\HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\LowRegistry\Audio\PolicyConfig\PropertyStore\99cb5fd0_0
No Idea how the "99cb5fd0_0" is determined
That Key has a SubKey made from a GUID
In that SubKey there are three Values:
"3", "4", "5"
Playing around, i could find out, that "3" corresponds with the Volume-Setting, while "5" is Mute/Unmute
"4" is probably Left/Right

SymbolicFrank:
This is the API you need. But I couldn't find a declaration of the ISimpleAudioVolume interface (from audioclient.h) in de fpc sources.

Nicole:
Thank you for the answers.
What I would need: How to do this by Lazarus?
Do you have some lines of code for me?

Zvoni:
UOS might be an alternative
https://wiki.freepascal.org/uos
https://wiki.lazarus.freepascal.org/Multimedia_Programming#Windows

Or this API
https://docs.microsoft.com/en-us/windows/win32/api/mmeapi/nf-mmeapi-waveoutsetvolume

Navigation

[0] Message Index

Go to full version