diff options
Diffstat (limited to 'src/audio')
-rw-r--r-- | src/audio/audio.cc | 7 | ||||
-rw-r--r-- | src/audio/audio.h | 2 |
2 files changed, 3 insertions, 6 deletions
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__ |