Raised This Month: $12 Target: $400
 3% 

Changing volume level of already playing sound (is possible)?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 02-02-2019 , 10:09   Changing volume level of already playing sound (is possible)?
Reply With Quote #1

Hi,

I'm tring to play sound from /music/ folder. But it is too quiet in the background of music that is already playing.

Is it possible to reduce the volume level of music that is already playing?
Thanks.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 02-02-2019 , 12:18   Re: Changing volume level of already playing sound (is possible)?
Reply With Quote #2

Ok, I found
https://forums.alliedmods.net/showpo...4&postcount=10
It is not work for L4d, but I think it is a right direction for further experiments.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 02-02-2019 , 13:35   Re: Changing volume level of already playing sound (is possible)?
Reply With Quote #3

I think impossible
You only can hook when sound is emited and block
Then create another sound with the same attributes but change volume, I am use this for maps music with clientpref

Last edited by Indarello; 02-02-2019 at 13:35.
Indarello is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 02-16-2019 , 05:53   Re: Changing volume level of already playing sound (is possible)?
Reply With Quote #4

Ok, I found the way.
Code:
int entity = CreateEntityByName("ambient_generic");
similar, but FindEntity +
Code:
SetVariantInt(10);
AcceptEntityInput(entity, "Volume");
should be enough.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:29.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode