mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-04-23 20:00:59 +00:00
Extra bloaty junk to modernise stuff a bit.
https://fte.triptohell.info/moodles/qss/
* snd_mix.c: Increased PAINTBUFFER_SIZE from 512 to 2048. * snd_mix.c: snd_vol is static now. it is calculated in S_PaintChannels and only used in SND_PaintChannelFrom16. all its other uses are removed from Snd_WriteLinearBlastStereo16, S_TransferStereo16, S_TransferPaintBuffer. The way it was, the sound volume was applied to the whole final contents of the paint buffer, but with this new quake2+ way we can add raw samples to the paint buffer with its own volume, such as bgmvolume. However, this makes the snd_scaletable to be recalculated everytime the sfxvolume is, changed, therefore it is adjusted that way to incorporate sfxvolume. * snd_mix.c: In S_PaintChannels, check against s_rawend and copy from the streaming sound source if necessary. * snd_dma.c: Added old_volume to detect sfxvolume changes. Made S_Update to compare it to sfxvolume.value and call SND_InitScaletable() if it changed. * snd_dma.c: Add new globals s_rawsamples and s_rawend. Reset s_rawend to 0 in S_ClearBuffer. Add new function S_RawSamples, adapted from quake2 with its 8 bit stereo playback fixed. * snd_dma.c (S_FileExtension): Add new function which returns the given sound file's extension including the dot, or NULL. * q_sound.h: Add new macro MAX_RAW_SAMPLES, defined as 8192. Add externs for new globals s_rawsamples and s_rawend. Add prototype for the new S_RawSamples and S_FileExtension functions. git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@355 af15c1b1-3010-417e-b628-4374ebc0bcbd |
||
---|---|---|
quakespasm |