diff options
author | Stijn Buys <ingar@osirion.org> | 2008-07-17 23:10:05 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-07-17 23:10:05 +0000 |
commit | e7cd0386ce564a4ac1c6ba866afeda54e6e8d1d9 (patch) | |
tree | 5bef1af4a437e85e8b28e89ef10b237a14133062 /src/audio | |
parent | ae65ef53fc8b70ebee3b43bb06ecd091aaae2a26 (diff) |
spacedust, r_dust variable
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__ |