mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-12-11 13:30:59 +00:00
8747ee63d3
Originally sound updates only happened about every 100ms and `sampleTime` (or `newSoundTime`) was a multiple of 4096 (`MIXBUFFER_SAMPLES`). After I changed this to updates every 16ms and made the calculation of `sampleTime` a lot simpler, it could be any value (as it's current amount of milliseconds multiplied by 44.1). It generally seemed to work, but it seems advisable to make it a multiple of 8 (see also "Fix endless loop when decoding OGGs" commit). So I round it to the nearest multiple of 8 now. Furthermore I increased the accuracy when the game has been running for a long time by using double instead of float, and tried to make sure that `sampleTime` is always positive (or at least as long as `inTime` is positive). |
||
---|---|---|
.. | ||
efxlib.h | ||
snd_cache.cpp | ||
snd_decoder.cpp | ||
snd_efxfile.cpp | ||
snd_emitter.cpp | ||
snd_local.h | ||
snd_shader.cpp | ||
snd_system.cpp | ||
snd_wavefile.cpp | ||
snd_world.cpp | ||
sound.h | ||
stb_vorbis.h |