]> icculus.org git repositories - taylor/freespace2.git/blob - src/sound/ds3d-unix.cpp
finished cfilesystem.
[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         ALfloat posv[] = { pos->x, pos->y, pos->z };
16         ALfloat velv[] = { vel->x, vel->y, vel->z };
17         ALfloat oriv[] = { orient->a1d[0], 
18                         orient->a1d[1], orient->a1d[2],
19                         orient->a1d[3], orient->a1d[4],
20                         orient->a1d[5] };
21         alListenerfv(AL_POSITION, posv);
22         alListenerfv(AL_VELOCITY, velv);
23         alListenerfv(AL_ORIENTATION, oriv);
24
25         return -1;
26 }
27
28 int ds3d_init (int unused)
29 {
30         ALfloat pos[] = { 0.0, 0.0, 0.0 },
31                 vel[] = { 0.0, 0.0, 0.0 },
32                 ori[] = { 0.0, 0.0, 1.0, 0.0, -1.0, 0.0 };
33
34         alListenerfv (AL_POSITION, pos);
35         alListenerfv (AL_VELOCITY, vel);
36         alListenerfv (AL_ORIENTATION, ori);
37
38         if(alGetError() != AL_NO_ERROR)
39                 return -1;
40
41         return 0;
42 }