   speed of sound
  hey guys,  I have been trying to speed up the reactiveness of my sound effects.  An entity in my game performs this action many times (so naturally I found a very small sound "bite" to sound for it)  & I''m using openAL to do my sound.  when the dude does the action... the sound lags behind a lil bit, & when he does the action many times in a row... its very obvious... cus when he is done doing the action, somewhere around 1/2 to 1 sound effect still plays at the end.  At first I thought that the sound bite was so long, that the first sound didn''t finish before I told it to play again, so it just built up, but that is not the case, I used 2 sources & toggled between them & I still have the same problem.  then I thought that I updated the position of the source too often (every frame), so I only updated the position right before I played that source (the sound is short enough, that you really can''t tell its "static" at that position).   Any suggestions?  I''d be more than happy to post some code if you think that would help. 
  Are there no sound experts here?  I''m having similar trouble with my program too. ;  All i (and probably a lot other people) know for sure is that fmod works fine and is easy to implement , you should give it a try. ;  I haven''t used OpenAL for quite some time now, but generally speaking, sound lagging and acoustic effects caused by movement of sound sources and the propagation of sound itself, usually fall under the category of the "Doppler effect". IIRC, OpenAL had a "Doppler veolcity" variable that you could set - if you want no lagging, set it to some exorbitantly high value (I''m sure there are also somekind of OPENAL_DOPPLER_MIN and OPENAL_DOPPLER_MAX special values that you can set). Realistic effects should be acheived through setting this value to 340 (speed of sound in meters per second) times the scale of your geometric data.Sorry if that''s of little use... ;  Is the sound being loaded each time? It could be (just a guess) that every time your playing the sound, it actually is being loaded into memory which could cause the delay. You could also add some type of visual cue when the audio is playing to make sure there is no delay somewhere else in the code.Hope that helps,Luigi ;  Luigi, That is actually a good question & possibility.  I don''t have my code with me here, but I assume the proper order of things is:1.  genbuffer() & load sound file into buffer2.  gensource() & attach buffer to source3.  call playsource() whenever sound is supposed to soundexcuse the bad spelling, this would be considered sloppy psuedo code.   Keep in mind I''m getting the sound, it just appears to be lagged behind.  Weird.  I''ll test it out with a better visual cue to assure that its lagged. ;  What device are you using? I know i had similar problems using wave mapper, setting the buffer length to about 7 seconds solved the problem. You might want to try that too. ;  you mean what sound card?  I don''t even know... its the one that came with this comp (pretty new dell with all the trimmings).  I don''t know about the setting the buffer length to that long, this sound effect occurs a lot & sometimes with high frequency (never a freq faster than the sound just looping though).   ;  Like; I can choose out of these devices:[1] Wave Mapper[2] SB Live! Audio [C000]When using Wave Mapper, i had 'buffer underruns' (you might be familiar with those when burning cds ), this causes the short breaks, or even lags when playing the sound or before the sound. This was caused by slow sound loading, so your problem might also be solved by pre-loading the sound buffer.   [edited by - Tree Penguin on February 7, 2004 12:46:47 PM];  Oh... I think I know what you mean... I (at the moment) am not using any device, I''m using "alut" & alutInit(); which I think handles that device crap for me.  If just one person tells me that I should use alut & I should do the device crap myself (you don''t even have to claim to be smart) then I''ll try it.  Also... If I''m off in left field... stop me from talking & please explain. 