Hehehe. I've been thinking about a good way to create binaural recording-like sound on the fly without
HRTFs. HRTFs essentially being a big database of how to change sound incoming sounds to make it sound like a binaural recording. The problem with those is they are effectively static; they are compiled from data obtained by testing in a sound lab, rather than being effected by the environment in which you want the sound to be.
So my though process went like so:
"Hmm... a method akin to ray tracing would be good, as it takes into account global effects like echoes; but it needs to be continuous rather than discrete, as sound travels in waves."
"Ah, but they do for the most part reflect at the same angle as incidence... which means by positioning a new source behind the object at the same distance as the original source and propagate in a sphere within the reflective frustum from there, you would get wave reflection!"
"Which I guess would make it frustum tracing."
*Googles 'frustum tracing'*
First result:
http://www.youtube.com/watch?v=3aqSB-Ocr04http://gamma.cs.unc.edu/SOUND/Bingo.

Turning it into binaural then requires adding a second listener for the other ear (trivial), inserting a vaguely humanoid model for proper obscuring of the sound, and done. Though, granted, I probably won't have time to implement the part they did, let alone turn it into a full program capable of being called binaural. But ah well; still fun to think about.
It's always annoyed me how the sound positioning in first-person games is always crap. If an NPC is two floors above me, I can somehow hear their footsteps perfectly clearly. If anyone fires a gun in Counter-Strike, I know exactly where they are. And yet people spend hundreds of dollars on surround sound setups.
That looks amazing. Hopefully this technique will eventually become standard for all FPSs. Wait, that video is from 2009... Damnit game developers, stop spending money on better graphics. The graphics equivalent of today's sound is like having unshaded, untextured models.
That bolded text is actually
precisely the reason for it; or at least a very large part of it. You see, something they don't tell you about those several hundred dollar surround sound setups is this:
They are inherently, irreconcilably flawed by their very nature. You simply cannot get the quality sound required. You can get some directionality, but it is effectively limited to crap 2 dimensional effects. The reason for this from what I read is because of both the varying distances from the speakers combined with interaction of the sound with the room the listener is in. Effectively you get sound effect -> environmental interaction -> HRTF -(speakers)>environmental interaction(room) ->HRTF(listener head) rather than simply sound effect->environmental interaction->HRTF->headphones.
So, in reality, so long as the headphones aren't so crappy as to not work properly, they will be capable of superior effects to surround sound; as evidenced by some of those binaural recordings like
virtual barbershop.
Or at least, that's what I read online from biased sources who may or may not entirely know the truth; so take it with a hefty grain of salt. There was some talk of consoles being partly responsible due to their mostly non-use of headphones as well as rumblings about Creative monopolizing and killing off sound cards, but there seemed to be too many axes to grind in those directions for me to put much trust in those accounts.
Though the other big reason is one of performance; particularly regarding global sound interaction like that in the paper. They were getting "4-20 FPS" using a high-end modern multicore computer, doing nothing else but some very simply polygon rendering. For games, that's pretty much unacceptable.
That said... a high-end multicore processor from 2009 is a joke compared to a particular thing which could be use to make this run in real time in a potential game environment, even after adding a second listener and HRTF-y stuff.... Though it still would heavily constrain possible graphics. That method would be to use GPU processing; which is what I'm considering doing if I find the time (I won't, let's be honest here

). By offloading such an
embarrassingly parallel algorithm to a modern GPU's hundreds of cores, it could probably be made feasible for a game with limited graphical scope (as the GPU would be busy doing soundy-things).
The problem with sound is its absence from pretty much any discussion. Even at RIT, which is ranked #6 in the US for our undergrad Game Development department, there's been hardly a whisper about sound in our coursework in the undergrad program (though the grad program, ranked #2, does have a track which goes into sound specifically if you so choose). So yeah... It just isn't really a priority.
Though considering that paper is from '07, you shouldn't expect many games to use it. 5 years is actually a really short time to go from research paper to game in most cases. Usually it goes: "Hey! We just figured out something neat!" *5-20 years later* "Hey! By optimizing this and using the latest technology to do it exclusively, we can get it to do that neat thing in real time(note: real time is defined as 12FPS or higher)!" *2 years later* "By building on this previous paper, we have implemented this with further optimizations which make it doable in real time so long as you aren't doing much else!" and so on. Take for example
Finite Element Method. That was around for half a century before being used in games; and even now it's still only starting to hit its stride in games with things like this:
http://www.youtube.com/watch?v=A4aTyC2Ru_Y Processing speed is the name of the game when it comes to making games.