problem with 16 bit sounds

Discuss programming topics for the various GPL'd game engine sources.
Post Reply
szo
Posts: 132
Joined: Mon Dec 06, 2010 4:42 pm

problem with 16 bit sounds

Post by szo »

While adding streaming music support to quakespasm (http://quakespasm.sourceforge.net/), I had to move the snd_vol usage in snd_mix.c to SND_PaintChannelFrom16() for 16 bit samples. This is in parallel to quake2 (as well as quake3) code. Here's the relevant svn change: http://quakespasm.svn.sourceforge.net/v ... vision=355

After that change, however, I noticed that some 16 bit ambient sounds in warpspasm mod caused a lot of static which wasn't there before. I had to find the following solution noticing that there was an integer overflow: http://quakespasm.svn.sourceforge.net/v ... vision=401

On the other hand, I haven't noticed such an issue in quake2 so far, which, AFAIK, uses 16 bit sounds. Can anyone tell that I actually made a mistake in new sound code or whether the applied fix is correct, please? Thanks.
stevenaaus
Posts: 23
Joined: Fri Jan 08, 2010 10:15 am

Post by stevenaaus »

Hmmm... Perhaps no one is interested in a minor sound issue for these old things ;>.
For anyone associated with ioquake3, this bug report seems to be related.
Post Reply