]> icculus.org git repositories - taylor/freespace2.git/blob - src/sound/ds3d-unix.cpp
Added OpenAL support.
[taylor/freespace2.git] / src / sound / ds3d-unix.cpp
1 #include <AL/al.h>
2 #include <AL/alc.h>
3 #include <AL/alut.h>
4
5 #include "pstypes.h"
6
7 void ds3d_close()
8 {
9         STUB_FUNCTION;
10 }
11
12 int ds3d_update_listener(vector *pos, vector *vel, matrix *orient)
13 {
14         STUB_FUNCTION;
15         
16         return -1;
17 }
18
19 int ds3d_init (int unused)
20 {
21         ALfloat pos[] = { 0.0, 0.0, 0.0 },
22                 vel[] = { 0.0, 0.0, 0.0 },
23                 ori[] = { 0.0, 0.0, 1.0, 0.0, -1.0, 0.0 };
24
25         alListenerfv (AL_POSITION, pos);
26         alListenerfv (AL_VELOCITY, vel);
27         alListenerfv (AL_ORIENTATION, ori);
28
29         if(alGetError() != AL_NO_ERROR)
30                 return -1;
31
32         return 0;
33 }