@@ -815,17 +815,18 @@ static void calculate_distance_attenuation_and_angle_scalar(const ALCcontext *ct
815815 const ALfloat * at = & ctx -> listener .orientation [0 ];
816816 const ALfloat * up = & ctx -> listener .orientation [4 ];
817817
818- // If !source_relative, position is absolute, otherwise, it's in relation to the Listener's position.
819- // Another way to say this is that if !source_relative, act like the listener is at (0,0,0).
818+ // If !source_relative, position is in world space, otherwise, it's in relation to the Listener's position.
819+ // So a source-relative source that's at ( 0, 0, 0 ) will be treated as being on top of the listener,
820+ // no matter where the listener moves. If not source relative, it'll get quieter as the listener moves away.
820821 ALfloat position [3 ];
821822 if (!src -> source_relative ) {
822- position [0 ] = src -> position [0 ];
823- position [1 ] = src -> position [1 ];
824- position [2 ] = src -> position [2 ];
825- } else {
826823 position [0 ] = src -> position [0 ] - ctx -> listener .position [0 ];
827824 position [1 ] = src -> position [1 ] - ctx -> listener .position [1 ];
828825 position [2 ] = src -> position [2 ] - ctx -> listener .position [2 ];
826+ } else {
827+ position [0 ] = src -> position [0 ];
828+ position [1 ] = src -> position [1 ];
829+ position [2 ] = src -> position [2 ];
829830 }
830831
831832 // Remove upwards component so it lies completely within the horizontal plane.
0 commit comments