]> 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 d07970a3d238c849143f1efa512ea8b9aad5a881..2eb4910d2bf73426a7e3ec4029c875790cb89c03 100644 (file)
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
+#ifdef HAVE_CONFIG_H
+#  include <simgear_config.h>
+#endif
 
 #if defined( __APPLE__ )
 # define AL_ILLEGAL_ENUM AL_INVALID_ENUM
@@ -335,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 );