Forum

Higher-quality WAV support for GLQuake

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Higher-quality WAV support for GLQuake

Postby JasonX » Fri Apr 08, 2011 3:49 pm

Haven't seen anything about audio improvements, only graphics. Anyone seen any tuts?
JasonX
 
Posts: 411
Joined: Tue Apr 21, 2009 2:08 pm

Postby Baker » Fri Apr 08, 2011 5:08 pm

See JoeQuake source code, look for COM_CheckParm("-44Hz") or some such thing in one of the snd_???.c files. I'm thinking it is in Snd_Init.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby mh » Fri Apr 08, 2011 5:40 pm

Beware though that Quake's source audio files are low quality. With digital audio once you remove something it's gone forever. You can't get it back. Quake itself has a fairly crude resampling function but when going to a higher frequency all this does is pitch-shift the audio. This isn't higher quality, it's just higher frequency but the quality is actually significantly worse as it throws out all of the low frequencies that give sound it's presence and impact.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby Spike » Fri Apr 08, 2011 7:53 pm

blindly increasing the frequency by just making the samples wider is not going to help sound quality, especially if you use non-integer rate multipliers.
hardware that moves speakers to match the current sample will not sound good when it moves faster than it ought, and then stops for a while, basically.

having said that, some of the sounds were recorded at a rate of 22khz and are still in that format, so you can get a slight improvement on quality on those sounds, but only those sounds when played at 22khz.

DP has a linear resampling routine which can give better quality sound when resampled.

Anything more complicated (say, 4/6 speakers) requires more work.
Using openal or something instead requires a heck of a lot of work. Such features do not make simple/useful tutorials.
Having said that, I have some voice chat code lying around which is self-contained enough to be easy to port, except for actually playing it. :)
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby leileilol » Fri Apr 08, 2011 9:33 pm

snd_dos.c has a -sspeed cvar the other snd_*'s don't have
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest