[MPlayer-cvslog] r21546 - trunk/libao2/ao_openal.c

reimar subversion at mplayerhq.hu
Sat Dec 9 13:14:14 CET 2006


Author: reimar
Date: Sat Dec  9 13:14:14 2006
New Revision: 21546

Modified:
   trunk/libao2/ao_openal.c

Log:
Improve OpenAL speaker positions a bit.


Modified: trunk/libao2/ao_openal.c
==============================================================================
--- trunk/libao2/ao_openal.c	(original)
+++ trunk/libao2/ao_openal.c	Sat Dec  9 13:14:14 2006
@@ -61,12 +61,11 @@
 
 static int init(int rate, int channels, int format, int flags) {
   float position[3] = {0, 0, 0};
-  float direction[6] = {0, 0, 1, 0, 1, 0};
+  float direction[6] = {0, 0, 1, 0, -1, 0};
   float sppos[6][3] = {
-    {-1, 0, 1}, {1, 0, 1},
-    {-1, 0, -1}, {1, 0, -1},
-    {0, 0, 0},
-    {0, 0, 0}
+    {-1, 0, 0.5}, {1, 0, 0.5},
+    {-1, 0,  -1}, {1, 0,  -1},
+    {0,  0,   1}, {0, 0, 0.1},
   };
   ALCdevice *dev = NULL;
   ALCcontext *ctx = NULL;
@@ -100,6 +99,8 @@
     alSourcefv(sources[i], AL_POSITION, sppos[i]);
     alSource3f(sources[i], AL_VELOCITY, 0, 0, 0);
   }
+  if (channels == 1)
+    alSource3f(sources[0], AL_POSITION, 0, 0, 1);
   ao_data.channels = channels;
   alGetBufferi(buffers[0][0], AL_FREQUENCY, &bufrate);
   ao_data.samplerate = rate = bufrate;



More information about the MPlayer-cvslog mailing list