Forum

Stuffcmd Sound Fade

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Stuffcmd Sound Fade

Postby DusterdooSmock » Sun Nov 27, 2011 3:17 am

I've noticed that when playing sounds via stuffcmd, if you turn either to the left or to the right of the direction that you were originally facing, the sound starts to fade..
I was wondering if anyone has come up with a way to prevent this from happening, so that the sound plays at a constant volume no matter how much the player turns?
DusterdooSmock
 
Posts: 170
Joined: Thu Aug 19, 2010 9:58 pm

Re: Stuffcmd Sound Fade

Postby Spike » Sun Nov 27, 2011 4:36 am

some engines have a play2 command to fix it, while the qw ones tend to change the behavior of play itself.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Stuffcmd Sound Fade

Postby DusterdooSmock » Sun Nov 27, 2011 5:55 pm

Thank you. :D I took a look in the Darkplaces source and found the "play2" command, then edited the "play" command in my engine so that the attenuation was 0 aswell, and it works. I wonder why ID put attenuation on stuffcmd sounds in the first place.. :?
DusterdooSmock
 
Posts: 170
Joined: Thu Aug 19, 2010 9:58 pm

Re: Stuffcmd Sound Fade

Postby mh » Mon Nov 28, 2011 7:43 am

You're not supposed to play sounds using stuffcmd, you're supposed to play them using the builtin sound function.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Stuffcmd Sound Fade

Postby leileilol » Mon Nov 28, 2011 9:48 am

But LOCAL sounds! Like say, death beep, hit noise or something
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: Stuffcmd Sound Fade

Postby qbism » Mon Nov 28, 2011 6:01 pm

Local sounds require an engine with that feature. The old timefrag project had "sv_localsound". Maybe there's a standard extension for local sound by now?
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: Stuffcmd Sound Fade

Postby Spike » Mon Nov 28, 2011 10:12 pm

generally you don't want local sounds, but private sounds instead...
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Stuffcmd Sound Fade

Postby qbism » Tue Nov 29, 2011 12:02 am

"private" would be more accurate than "local" to describe a non-spatialized sound directed to a single entity (player). svc_privatesound
There's also a dp extension IIRC for a point sound that originates from a coordinate rather than an entity.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: Stuffcmd Sound Fade

Postby DusterdooSmock » Wed Nov 30, 2011 1:11 am

leileilol wrote:But LOCAL sounds! Like say, death beep, hit noise or something

O_O How did you know? Both of those are exactly what I was using it for.. :O Lol.
DusterdooSmock
 
Posts: 170
Joined: Thu Aug 19, 2010 9:58 pm


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest