This example illustrates the use of the BinauralPanner to spatialize in real-time an incoming monophonic audio stream around the head of the listener.
Other examples are here.