.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Half-Life 1 SDK (http://forums.bots-united.com/forumdisplay.php?f=33)
-   -   EMIT_SOUND and sound levels >1 ? (http://forums.bots-united.com/showthread.php?t=667)

Pierre-Marie Baty 09-02-2004 02:31

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 ?

botmeister 09-02-2004 08:42

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);
It looks like the volume used to be specified as an int instead of a float.

Try specifying the volume in increments that are whole numbers?

Pierre-Marie Baty 09-02-2004 12:15

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...

stefanhendriks 18-02-2004 09:58

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'?

Pierre-Marie Baty 18-02-2004 11:59

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...

Terran 18-02-2004 13:15

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 :-)

Terran 18-02-2004 13:19

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...

stefanhendriks 18-02-2004 13:49

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? :)

Pierre-Marie Baty 18-02-2004 15:53

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

botmeister 18-02-2004 19:21

Re: EMIT_SOUND and sound levels >1 ?
 
Quote:

Originally Posted by Terran
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...

Where can I get more information on how to use this feature? This is exactly what I need for my server!


All times are GMT +2. The time now is 16:09.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.