.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > SDK Programming discussions > Half-Life 1 SDK
Half-Life 1 SDK For developments focused around Half-Life (and its mods) Half-Life

Reply
 
Thread Tools
EMIT_SOUND and sound levels >1 ?
Old
  (#1)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default EMIT_SOUND and sound levels >1 ? - 09-02-2004

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 ?



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: EMIT_SOUND and sound levels >1 ?
Old
  (#2)
botmeister
Ex-Council Member
 
botmeister's Avatar
 
Status: Offline
Posts: 1,090
Join Date: Nov 2003
Location: Canada
Default Re: EMIT_SOUND and sound levels >1 ? - 09-02-2004

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?


Maker of the (mEAn) Bot.Admin Manager

"In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. van de Snepscheut
  
Reply With Quote
Re: EMIT_SOUND and sound levels >1 ?
Old
  (#3)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: EMIT_SOUND and sound levels >1 ? - 09-02-2004

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



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: EMIT_SOUND and sound levels >1 ?
Old
  (#4)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: EMIT_SOUND and sound levels >1 ? - 18-02-2004

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


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: EMIT_SOUND and sound levels >1 ?
Old
  (#5)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: EMIT_SOUND and sound levels >1 ? - 18-02-2004

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



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: EMIT_SOUND and sound levels >1 ?
Old
  (#6)
Terran
Member
 
Terran's Avatar
 
Status: Offline
Posts: 431
Join Date: Jan 2004
Default Re: EMIT_SOUND and sound levels >1 ? - 18-02-2004

Why useless? Other plugins like statsme make heavy usage of custom sounds and all players have to download them and nobody really complained :-)
  
Reply With Quote
Re: EMIT_SOUND and sound levels >1 ?
Old
  (#7)
Terran
Member
 
Terran's Avatar
 
Status: Offline
Posts: 431
Join Date: Jan 2004
Default Re: EMIT_SOUND and sound levels >1 ? - 18-02-2004

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...
  
Reply With Quote
Re: EMIT_SOUND and sound levels >1 ?
Old
  (#8)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: EMIT_SOUND and sound levels >1 ? - 18-02-2004

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!

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?


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: EMIT_SOUND and sound levels >1 ?
Old
  (#9)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: EMIT_SOUND and sound levels >1 ? - 18-02-2004

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



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: EMIT_SOUND and sound levels >1 ?
Old
  (#10)
botmeister
Ex-Council Member
 
botmeister's Avatar
 
Status: Offline
Posts: 1,090
Join Date: Nov 2003
Location: Canada
Default Re: EMIT_SOUND and sound levels >1 ? - 18-02-2004

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!


Maker of the (mEAn) Bot.Admin Manager

"In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. van de Snepscheut
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com