From e7cd0386ce564a4ac1c6ba866afeda54e6e8d1d9 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 17 Jul 2008 23:10:05 +0000 Subject: spacedust, r_dust variable --- src/audio/audio.cc | 7 ++----- src/audio/audio.h | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'src/audio') diff --git a/src/audio/audio.cc b/src/audio/audio.cc index ff0918d..20f6b1d 100644 --- a/src/audio/audio.cc +++ b/src/audio/audio.cc @@ -116,20 +116,17 @@ void loop( size_t source_index, const char *name, float pitch, float gain) alSourcePlay(source); } -void update_listener(math::Vector3f const &location, math::Axis const &axis, float speed) +void update_listener(math::Vector3f const &location, math::Axis const &axis, math::Vector3f const & velocity) { alListenerfv(AL_POSITION, location.ptr()); - math::Vector3f velocity(axis.forward()); - velocity = velocity * speed; - //alListenerfv(AL_VELOCITY, velocity.ptr()); - ALfloat orientation[6]; for (size_t i =0; i <3; i++) { orientation[i] = axis.forward()[i]; orientation[i+3] = axis.up()[i]; } alListenerfv(AL_ORIENTATION, orientation); + //alListenerfv(AL_VELOCITY, velocity.ptr()); } } diff --git a/src/audio/audio.h b/src/audio/audio.h index 629ae88..a3d4010 100644 --- a/src/audio/audio.h +++ b/src/audio/audio.h @@ -42,7 +42,7 @@ void loop( size_t source_index, const char *name, float pitch=1.0f, float gain=1 void update_source(size_t source_index, math::Vector3f const & location, math::Vector3f const & velocity, float pitch=1.0f, float gain=1.0f); /// update listener parameters -void update_listener(math::Vector3f const &location, math::Axis const &axis, float speed); +void update_listener(math::Vector3f const &location, math::Axis const &axis, math::Vector3f const & velocity); } #endif // __INCLUDED_AUDIO_AUDIO_H__ -- cgit v1.2.3