What you're looking for is referred to as HRTF (head related transfer function). It's a set of filters that take sound sources in 3D space relative to the listener's two ears as input and applies frequency and impulse effects to mimic the physical effects the listener's head and ear have on the sound. The specific parameters are apparently subject to the listener's unique head shape (my head sounds different than your head) but as you can imagine we've had some success with generalized one-size-fits-all profiles. Search "hrtf" on youtube and grab your headphones - there are some cool demos to be heard. I'm considering putting something like this in my game but that's way down the line from where I am now. Let me know what you find out!