]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/sample_openal.cxx
Maik JUSTUS: fix/implement directional sound
[simgear.git] / simgear / sound / sample_openal.cxx
index 310b6339b7ab9deb9f33c4f0d71f37eb790776b3..2eb4910d2bf73426a7e3ec4029c875790cb89c03 100644 (file)
@@ -338,6 +338,9 @@ SGSoundSample::set_orientation( ALfloat *dir, ALfloat inner_angle,
     inner = inner_angle;
     outer = outer_angle;
     outergain = outer_gain;
+    direction[0] = dir[0];
+    direction[1] = dir[1];
+    direction[2] = dir[2];
     if (playing) {
         alSourcefv( source, AL_DIRECTION, dir);
         alSourcef( source, AL_CONE_INNER_ANGLE, inner );