3D Sound with AUD?

How do I get 3D Sound to work with AUD? I have:

    device = aud.device()
    device.listener_location = scene.active_camera.worldPosition
    device.distance_model = aud.AUD_DISTANCE_MODEL_LINEAR
    handle = device.play(shot)
    handle.location = own.worldPosition
    handle.pitch = random.uniform(0.9,1.1)
    handle.relative = False

But the sound does not appear to be the same 3D as the sound actuator. Do I need to set the volume based on the distance from the source or is there another way?

You need to specify velocities of source and listener

device.listener_velocity = scene.active_camera.getLinearVelocity()
handle.velocity = own.getLinearVelocity()

Hmmm… I’ve never set the linear velocity, but I did set the listener orientation.

device.listener_orientation = self.camera.worldOrientation.copy().to_quaternion()