X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2Fopenal_wrapper.cpp;h=5e832fb5bc6959099b292cc2eea29e4aeb22184b;hb=8afdcba610cded0e54b85069ba051268b29669a6;hp=b4f526682a2405c27ee9c901db91cb8b01423f9c;hpb=03e4e9fccebe5faf404de1b8d641ad1a981112bc;p=lugaru.git diff --git a/Source/openal_wrapper.cpp b/Source/openal_wrapper.cpp index b4f5266..5e832fb 100644 --- a/Source/openal_wrapper.cpp +++ b/Source/openal_wrapper.cpp @@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include +#include "Quaternions.h" #include "openal_wrapper.h" #include "Sounds.h" @@ -186,6 +187,16 @@ AL_API signed char OPENAL_3D_SetAttributes(int channel, const float *pos, const return true; } +AL_API signed char OPENAL_3D_SetAttributes_(int channel, const XYZ &pos, const float *vel) +{ + if (!initialized) return false; + if ((channel < 0) || (channel >= num_channels)) return false; + + set_channel_position(channel, pos.x, pos.y, -pos.z); + + return true; +} + AL_API signed char OPENAL_Init(int mixrate, int maxsoftwarechannels, unsigned int flags) { if (initialized) return false; @@ -633,8 +644,7 @@ AL_API signed char OPENAL_SetOutput(int outputtype) return true; } -extern int channels[100]; -extern OPENAL_STREAM * strm[20]; +extern int channels[]; extern "C" void PlaySoundEx(int chan, OPENAL_SAMPLE *sptr, OPENAL_DSPUNIT *dsp, signed char startpaused) {