Raised This Month: $32 Target: $400
 8% 

[TF2] EmitSoundToClient Volume Above 1.0


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 06-23-2017 , 14:27   [TF2] EmitSoundToClient Volume Above 1.0
Reply With Quote #1

I'm having a little problem with EmitSound: If I were to set the volume anything above 1.0, it does not play at all, despite it's precached and downloaded


Example:
PHP Code:
EmitSoundToClient(clientSound_PrestigeSOUND_FROM_PLAYERSNDCHAN_AUTOSNDLEVEL_NORMALSND_CHANGEVOL3.0); 
RumbleFrog is offline
Kinsi
Senior Member
Join Date: Apr 2013
Old 06-23-2017 , 16:46   Re: [TF2] EmitSoundToClient Volume Above 1.0
Reply With Quote #2

Thats because doing said thing isnt possible. Try playing with the level parameter

PHP Code:
/**
 * Various predefined sound levels in dB.
 */
enum
{
    
SNDLEVEL_NONE 0,            /**< None */
    
SNDLEVEL_RUSTLE 20,        /**< Rustling leaves */
    
SNDLEVEL_WHISPER 25,        /**< Whispering */
    
SNDLEVEL_LIBRARY 30,        /**< In a library */
    
SNDLEVEL_FRIDGE 45,        /**< Refrigerator */
    
SNDLEVEL_HOME 50,            /**< Average home (3.9 attn) */
    
SNDLEVEL_CONVO 60,        /**< Normal conversation (2.0 attn) */
    
SNDLEVEL_DRYER 60,        /**< Clothes dryer */
    
SNDLEVEL_DISHWASHER 65,    /**< Dishwasher/washing machine (1.5 attn) */
    
SNDLEVEL_CAR 70,            /**< Car or vacuum cleaner (1.0 attn) */
    
SNDLEVEL_NORMAL 75,        /**< Normal sound level */
    
SNDLEVEL_TRAFFIC 75,        /**< Busy traffic (0.8 attn) */
    
SNDLEVEL_MINIBIKE 80,        /**< Mini-bike, alarm clock (0.7 attn) */
    
SNDLEVEL_SCREAMING 90,    /**< Screaming child (0.5 attn) */
    
SNDLEVEL_TRAIN 100,        /**< Subway train, pneumatic drill (0.4 attn) */
    
SNDLEVEL_HELICOPTER 105,    /**< Helicopter */
    
SNDLEVEL_SNOWMOBILE 110,    /**< Snow mobile */
    
SNDLEVEL_AIRCRAFT 120,    /**< Auto horn, aircraft */
    
SNDLEVEL_RAIDSIREN 130,    /**< Air raid siren */
    
SNDLEVEL_GUNFIRE 140,        /**< Gunshot, jet engine (0.27 attn) */
    
SNDLEVEL_ROCKET 180,        /**< Rocket launching (0.2 attn) */
}; 
Kinsi is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 06-23-2017 , 22:32   Re: [TF2] EmitSoundToClient Volume Above 1.0
Reply With Quote #3

Quote:
Originally Posted by Kinsi View Post
Thats because doing said thing isnt possible. Try playing with the level parameter

PHP Code:
/**
 * Various predefined sound levels in dB.
 */
enum
{
    
SNDLEVEL_NONE 0,            /**< None */
    
SNDLEVEL_RUSTLE 20,        /**< Rustling leaves */
    
SNDLEVEL_WHISPER 25,        /**< Whispering */
    
SNDLEVEL_LIBRARY 30,        /**< In a library */
    
SNDLEVEL_FRIDGE 45,        /**< Refrigerator */
    
SNDLEVEL_HOME 50,            /**< Average home (3.9 attn) */
    
SNDLEVEL_CONVO 60,        /**< Normal conversation (2.0 attn) */
    
SNDLEVEL_DRYER 60,        /**< Clothes dryer */
    
SNDLEVEL_DISHWASHER 65,    /**< Dishwasher/washing machine (1.5 attn) */
    
SNDLEVEL_CAR 70,            /**< Car or vacuum cleaner (1.0 attn) */
    
SNDLEVEL_NORMAL 75,        /**< Normal sound level */
    
SNDLEVEL_TRAFFIC 75,        /**< Busy traffic (0.8 attn) */
    
SNDLEVEL_MINIBIKE 80,        /**< Mini-bike, alarm clock (0.7 attn) */
    
SNDLEVEL_SCREAMING 90,    /**< Screaming child (0.5 attn) */
    
SNDLEVEL_TRAIN 100,        /**< Subway train, pneumatic drill (0.4 attn) */
    
SNDLEVEL_HELICOPTER 105,    /**< Helicopter */
    
SNDLEVEL_SNOWMOBILE 110,    /**< Snow mobile */
    
SNDLEVEL_AIRCRAFT 120,    /**< Auto horn, aircraft */
    
SNDLEVEL_RAIDSIREN 130,    /**< Air raid siren */
    
SNDLEVEL_GUNFIRE 140,        /**< Gunshot, jet engine (0.27 attn) */
    
SNDLEVEL_ROCKET 180,        /**< Rocket launching (0.2 attn) */
}; 
I thought it could range between 1.0 and 10.0? If I go above 10.0, it gives an error. Also, I have tried SNDLEVEL, and anything above SIREN, cannot be heard.

Edit: I thought SNDLEVEL is how far it could be heard, and since its origin is the player, would it change anything?

Last edited by RumbleFrog; 06-23-2017 at 22:46.
RumbleFrog is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 06-24-2017 , 19:19   Re: [TF2] EmitSoundToClient Volume Above 1.0
Reply With Quote #4

I ended up calling EmitSoundToClient twice, and it does sound twice as loud. Is there any better solution for this? Say If I want to do 3x the volume
RumbleFrog is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 06-25-2017 , 00:11   Re: [TF2] EmitSoundToClient Volume Above 1.0
Reply With Quote #5

Call it 3 times
hmmmmm is offline
Kinsi
Senior Member
Join Date: Apr 2013
Old 06-25-2017 , 15:41   Re: [TF2] EmitSoundToClient Volume Above 1.0
Reply With Quote #6

Your best bet would be extracting the sound and manually upping its volume, and then using your custom version of the sound. Keep clipping in mind. You can normalize it to 0db in Audacity which will make it as loud as possible w/o clipping and then work from that. But thinking about it: Why do you even need something that loud?
Kinsi is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 06-25-2017 , 18:55   Re: [TF2] EmitSoundToClient Volume Above 1.0
Reply With Quote #7

Quote:
Originally Posted by Kinsi View Post
Your best bet would be extracting the sound and manually upping its volume, and then using your custom version of the sound. Keep clipping in mind. You can normalize it to 0db in Audacity which will make it as loud as possible w/o clipping and then work from that. But thinking about it: Why do you even need something that loud?
It's barely audible to anyone ATM, although it sounds fine when I manually play it back using VLC or audacity.

Last edited by RumbleFrog; 06-25-2017 at 18:55.
RumbleFrog is offline
Kinsi
Senior Member
Join Date: Apr 2013
Old 06-25-2017 , 20:01   Re: [TF2] EmitSoundToClient Volume Above 1.0
Reply With Quote #8

Is the sound you're trying to play in the music folder possibly? Because then its played back at the volume the user has set its music volume to.
Kinsi is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 06-27-2017 , 13:53   Re: [TF2] EmitSoundToClient Volume Above 1.0
Reply With Quote #9

Quote:
Originally Posted by Kinsi View Post
Is the sound you're trying to play in the music folder possibly? Because then its played back at the volume the user has set its music volume to.
It's in its own custom folder.
RumbleFrog 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 15:47.


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