![]() |
EMIT_SOUND and sound levels >1 ?
Hi,
I was trying to make a little improvment to my bleeding plugin so that the plugin plays a "body splat" sound when one gets his head burst away, but I can't seem to be able to play sounds louder than their default sound level. WTF ? I thought the engine had an integrated DSP ? I can only range the volume from 0 to VOL_NORM which is 1, and it's not sufficient since I want to use game sounds but just make them louder. Either using pfnEmitSound or pfnEmitAmbientSound it does not work. I must be doing something wrong but what ? |
Re: EMIT_SOUND and sound levels >1 ?
I always use "1" which has been good enough for me, so I don't have a specific solution for you. I did however notice this odd comment in the SDK
Code:
void pfnEmitSound (edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch); Try specifying the volume in increments that are whole numbers? |
Re: EMIT_SOUND and sound levels >1 ?
yes I noticed that too, that would explain why when I raise the volume above 1, I get error messageboxes "EMIT_SOUND: volume: 4096" or numbers like that.
Anyway, I keep searching... |
Re: EMIT_SOUND and sound levels >1 ?
This may sound stupid, but i know in HL itself you can set the actual volume on the console:
volume 0 is silent volume 1 is loud volume 0.8 is default now, perhaps you can pass that through the EmitSound function, you simply specify a float there, like 0.5 and you know it is 'half as loud'? |
Re: EMIT_SOUND and sound levels >1 ?
This works, Stefan... I'm just disappointed that there seems to be no way of passing EmitSoud volume levels that are GREATER to 1.
I'd have loved to hear a loud "CRUNCH" when players get headshot and the plugin displays large blood streams coming out of their head... too bad :) I could make my custom sounds but that would mean all players would have to download them (just for a blood FX plugin), so it's useless... |
Re: EMIT_SOUND and sound levels >1 ?
Why useless? Other plugins like statsme make heavy usage of custom sounds and all players have to download them and nobody really complained :-)
|
Re: EMIT_SOUND and sound levels >1 ?
Since one of the last steam updates a nice new feature was introduced: automatic download of resources from a webserver (sv_downloadurl "<your url>"!
With this feature enabled downloads are processed with full wire speed without the engines limitations. And I guess that your custom sound won't be a big file at all... |
Re: EMIT_SOUND and sound levels >1 ?
Well, its not unlogical you can't pass the volume higher then 1. I mean, when the glass is full, it is full! it can;t get more full! :D
Anyway, if your purpose is to let other players hear the sound harder, then you can try to let the sound emit closer to the player yo uwant to hear it. Because, also the closer the louder the volume right? I bet the engine handles that, so if yo ureally want the max of the max, you should do a 'play' command at that player and play the exact same sound as the player who gets killed. DO i make sense now? :) |
Re: EMIT_SOUND and sound levels >1 ?
...so on a 32 player server, if a player is killed, you tell me not to play ONE sound (using one network message), but 32 SOUNDS at different amplitudes, using 32 NETWORK MESSAGES ?
Stefan !... 9_9 :D |
Re: EMIT_SOUND and sound levels >1 ?
Quote:
|
All times are GMT +2. The time now is 16:09. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.