Raised This Month: $ Target: $400
 0% 

Some questions about emit_sound


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 06-14-2014 , 05:47   Some questions about emit_sound
Reply With Quote #1

So here's the dealio, I've created a small menu for terrorists in a jailbreak server to "speak", using a couple of sounds and sound_emit so it's not global but rather coming from the player, which is nice.

here's how it works:

PHP Code:
//menu shows sounds

//choosing from menu plays sound, also creates the speaking spr above the player for 2 seconds
emit_sound(idCHAN_AUTO"sound.wav"0.4ATTN_NORM0PITCH_NORM)

//a task delays the use of the next sound by the same player by 2 seconds, after which the menu is re-opened automatically(spamming still won't work with binds or whatever, the delay stops sounds from playing) 
My questions are:

Should I use one single channel for transmitting sounds? You have to imagine about 10 of these going on at once, and by what I've noticed (but I'm not sure about this) it sometimes interferes with the regular voicecom, and also causes overflows(not even close to sure about this)

What do you think is the best way to make this work? Should I just let it be automatic?
Also, is there any kind of limitations, eg sounds at once per channel, channel specific limitations

PHP Code:
//Sound Channels
#define CHAN_AUTO        0
#define CHAN_WEAPON        1
#define CHAN_VOICE        2
#define CHAN_ITEM        3
#define CHAN_BODY        4
#define CHAN_STREAM        5    //Stream channel from static or dynamic area
#define CHAN_STATIC        6    //Channel from the static area
#define CHAN_NETWORKVOICE_BASE    7    //Voice data coming across the network
#define CHAN_NETWORKVOICE_END    500    //Network voice data reserves slots

//Attenuation values
#define ATTN_NONE        0.00
#define ATTN_NORM        0.80
#define ATTN_IDLE        2.00
#define ATTN_STATIC        1.25

//Pitch values
#define PITCH_NORM        100
#define PITCH_LOW        95
#define PITCH_HIGH        120

//Volume values
#define VOL_NORM        1.0 
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
 



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 21:14.


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