Duration is an output that tells you how long the sound will take to play. Soundtime is for sub-frame timing on wave playback. i.e. without a soundtime the sound will start on the next client frame. We use this for things like machine gun sounds that need to be played exactly 75ms apart regardless of the client framerate for example.
Jay -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Edwards Sent: Friday, March 07, 2008 1:09 PM To: [email protected] Subject: Re: [hlcoders] Which EmitSound method should I use? The simplest overload I can find is this one: void EmitSound( const char *soundname, float soundtime = 0.0f, float *duration = NULL ) It's used by the playgamesound convar. I've no idea what the difference between soundtime and duration is though. :-s Jed wrote: > Hey all. > > I want to play a sound file on a game event handled in my gamerules > file. I just want to play it normally for each player with no apparent > source - basically like a global sound. > > I know I want the EmitSound function ( or at least I *think* I do :) ) > but it's got quite a few differnt constructs and for the life of me I > can't find the "simple" version to do what I want. > > So how should I call EmitSound to just play a WAV or MP3 file once > from gamerules with no origin, i.e. like a soundtrack? > > - Jed > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

